Forum Replies Created
July 29, 2020 at 2:17 pm in reply to: Radio button in a modulator group needs a default setting #119327
That’s why it is best to use a variable name like sName (s for string) instead of n even if Lua do not make the difference.
About the Called on mouse down vs Called when changed:
– with uiImageButton, indeed, the OnClick is only fired when you click on the label. I’m using that to display some value or help text without changing the actual value
– but I’m going further by redirecting my OnChange method to the OnClick one because I also want to display the value and help text when the user changes the value
-- -- Called when a modulator value changes -- @mod http://ctrlr.org/api/class_ctrlr_modulator.html -- @value new numeric value of the modulator -- OnOff_OnChange = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) -- No action while loading a program or if the panel is in bootstrap or program states if not isPanelReady() then return end OnOff_OnClick(mod:getComponent()) end
Best of both worlds 😉
I am new to CTRLR but I found out that it works with Momo’s D-05 editor on my Mac. Standalone and as AU in logic x, but no snapshots and still I can’t find out how to save and load anything.
Bulk dump didn’t work with the Thunderbolt interface but with the usb ( probably 1.0)midi cables. Well I just moved a few parameters and saved it in the D50 what more to ask for-/- lol
Hi, it is the responsibility of the panel developer to secure a well functioning panel.
I don’t know if Load/Save are foreseen in Momo’s editors. did you ask him?
In a more general way, snapshots have been implemented quite a long time ago in Ctrlr and I’m not sure if this functionality has been completed or not.
And don’t forget to also adjust Expression to evaluate when calculating the modulator value from the midi message value to the opposite 😉
what is the progress for your DP4 editor?
Finally, I just got a DP4 🙂
In parallel, I made and released a panel for the Behringer Odyssey. In that one, there is also a multi effect with different types of parameters for each of the 3 parameters by effect.
I found an easy way to handle all parameters and their different types, limits, min/max…
I’m also interested in that one 😉
I put it on my to-learn and try list but didn’t get a chance to do it by now 🙂
The “source” parameter is working fine.
To prevent Lua functions to be fired you indeed need to set a boolean, add a test at the beginning of all your “OnChange” methods, launch a timer to reset the boolean after all methods have gone through the test.
I’m using this for loading data in all modulators from a file.
Before starting the load, I set bLoadingProgram=true. In each OnChange methods i’m testing if bLoadingProgram == true and doing a direct return in that case.
All methods will be triggered due to the load of each parameters.
I also start a timer at load. Set it to enough time to have all your methods processed but not too much.
When stopping the timer, reset the boolean to false so your methods are executed nicely on manual turn of a button.
Standalone is good for testing.
Use 5.3.201 on PC, 5.3.198 on Mac.
Well… this is really strange… Ctrlr is bidirectional by default…
There is nothing to do.
Can you give a screenshot of your Midi settings?
You try with Ctrlr standalone, right?
Ok good! Can you post a screenshot of the midi monitor with both input and output sysex messages in?
Are there really the same?
It should work.
Did you use uiSlider or uiImageSlider?
Please try this panel.
FYI, I tested with uiSlider and it didn’t work. With uiImageSlider it works.
Let me know if it works with this test panel.
Attachments:You must be logged in to view attached files.
There is no need to use Lua coding to have bidirectional behavior for single parameters exchange (of course, well needed for requesting and receiving dumps).
– what are trying to achieve with f0 3e 22 11 10 00 00 34 xx f7?
– stay in Ctrlr panel development mode (no need to export anything to test this)
– you said your Midi input and output settings are ok in Ctrlr
– start the Ctrlr midi monitor and activate input and output monitoring
– if you send the sysex from the panel, do you see it appearing in the monitor output?
– if you send the sysex from the synth, do you see it appearing in the monitor input?
Please provide more info if you want to get helped (which synth, which parameter…)
Welcome to Ctrlr!
if needed, you may get some info in my Step by Step guide https://ctrlr.org/forums/topic/ctrlr-step-by-step-guide/
There is a limitation to 64 parameters to be exported so it might be your issue. One way to reduce is to strictly enable export when necessary.
However, you will still reach 64 pretty fast.
So, the other way is to add a ctrlr.overrides file that you place in the same folder where is installed the plugin Ctrlr.dll. Rename it to the same name of the plugin and extension overrides (in my case is “Ctrlr-VST-x64.overrides”), and set the changes listed below, otherwise you could only see 64 parameters (and none of them are related to the synth engine).
<?xml version="1.0" encoding="UTF-8"?> <ctrlrOverrides ctrlrMaxExportedVstParameters="5000" ctrlrShutdownDelay="256" ctrlrUseEditorWrapper="1" ctrlrLuaDisabled="0" ctrlrLogToFile="0" />
For your bidirectional sysex issue, it should work without any script or so.
I’m testing this with my Novation controller. when not working, check some basics:
– Start synth then panel
– check Midi Input and Midi Output settings in panel
– if sending from panel to synth is working, then your sysex is correct
I saw that this panel has not been replaced in 5.3.201 and the int64ToInt function is still not working.
What is this function supposed to do?
If we know that then we can re-code it ourselves.
Is the issue coming from the int64ToInt function or from the data it gets as argument?
You can find info about the arguments of functions in
Need a bit searching and is missing explanations but helps a bit…
This has been mentioned several times in some other threads.
It is a bug and you need to indeed add 24 pixels to have your exported panels fine.
Exporting a panel is not saving it…May 15, 2020 at 10:45 am in reply to: Stuck Again – Trying to construct a byte from individual bits #118414
Different things to improve:
– declare all your modulators in a separate AssignModulators() method instead of calling each time getModulatorByName(). Call that method from your PanelLoaded() method on panel init.
Later on, you can directly use those mod variables.
in AssignModulators you have declarations like modOPOnOff = panel:getModulatorByName(“OP_ON_OFF_BYTE”)
then in your other methods you simply use modOPOnOff:setValue(byte93Int, true)
– this is actually the second improvement, use setValue() io setModulatorValue(). The last 2 args of setModulatorValue() are not used (saw that in another post)
– to get the value of a mod, simply do modOPOnOff:getModulatorValue(). You should not go through the component as indicated in dnaldoog code.
For the rest, indeed dnaldoog code is the right answer. Just take each value and multiply it by 8,4,2,1 according to the bit position then add everything and you get your final value.
Changes of properties are modulator by modulator.
However, you can select several modulator at once (select first one then hold Ctrl while selecting the next ones). Try to select the same type of modulators. Edit the common property for all at once.
Remark: multi-selection is sometimes (not often) crashing; always frequently save. Verify your property on several modulators just to be sure (you can also display the properties by doing Panel -> Modulator list and in the list menu, select the appropriate visible columns then sorting
Oui, c’est celui que j’essaye d’avoir et pour lequel j’ai déjà envoyé 2 messages mais sans réponse. Le gars doit l’avoir déjà vendu et ne doit pas avoir envie de répondre. Il laisse aller l’annonce jusque expiration dans 2-3 jours je pense…
To complete dnaldoog answer’s (which is not appearing here but that we got in mail), here is a few conversion functions that you can put in one single method (I’m calling that method Miscellaneous).
As dnaldoog mentioned, not needed in most cases but sometimes well 😉
-- -- Returns HEX representation of a DECimal number -- dec2hex = function(num) local hexstr = '0123456789ABCDEF' local s = '' while num > 0 do local mod = math.fmod(num, 16) s = string.sub(hexstr, mod+1, mod+1) .. s num = math.floor(num / 16) end if s == '' then s = '0' end return s end -- -- For the conversion of a DECimal number to anything else -- it is just needed to use the built-in Lua function tonumber(string, base) -- -- print(tonumber("0100",2)) -- 4 -- print(tonumber("3F",16)) -- 63 -- -- Returns HEX representation of a String -- function str2hex(str) local hex = '' while #str > 0 do local hb = dec2hex(string.byte(str, 1, 1)) if #hb < 2 then hb = '0' .. hb end hex = hex .. hb str = string.sub(str, 2) end return hex end -- -- To display a memory block in ASCII -- it is just needed to use the built-in Lua function toString() -- -- message is "f0 00 20 32 28 00 74 01 32 2e 30 2e 32 f7" -- console(MidiMessage:getData():getRange(8, 5):toString()) -- 2.0.2 -- -- Returns ASCII representation of a string of HEX numbers separated by blanks or not -- Example: console(hex2ascii("32 2E 30 2E 32")) gives 2.0.2 -- Example: console(hex2ascii("322E302E32")) gives also 2.0.2 -- function hex2ascii(str) local ascii = '' while #str > 0 do if string.sub(str, 1,1) ~= " " then ascii = ascii .. string.char(tonumber(string.sub(str, 1,2), 16)) str = string.sub(str, 3) else str = string.sub(str, 2) end end return ascii end
Only needed to clean the cache when there is a resource issue.
.panel is a xml file yo can open in an editor as Notepad++
.bpanelz is a binary (b) compressed (z) file of a panel including the resources. Use that for sharing your panel otherwise people will mis the images.
Here is a summary I made in my Step by step guide (maybe it is only in my draft 2.x version):
Ctrlr standalone reads and can export its data in different formats:
─ XML: creates a .panel file (XML file that is thus readable/editable in Notepad or any text editor).
─ Compressed XML: creates a compressed file with extension .panelz
─ Binary: creates a binary file with extension .bpanel
─ Compressed binary: creates a compressed binary file with extension .bpanelz
─ Compressed binary + resources: creates a file containing the panel, images and fonts used as resources with extension .bpanelz (the best way to share on the net, smallest and loads quick)
─ Instance: creates an .exe file that contains the panel, its resources but also the complete Ctrlr program. It can be used to distribute your panel without having people downloading something. Everything is editable, people can switch mode…
─ Restricted instance: same as Instance (an .exe file is also created) but not editable
Use Compressed binary + resources when you want to share your panel with other people by providing them access to all images, the Lua code… so they can modify the panel or look how you built it.
Use Restricted instance when you want to distribute the panel in such a way that people cannot modify the panel or look at the Lua code. In a restricted instance the Panel menu is removed and the File menu contains only Quit.
Which panel? Which colors?
You must download and install Ctrlr.
Download a .bpanelz file to get the .panel and its resources (images).
If the colors you want to change are in the images, you need to adapt those source images.
If the colors you want to change are the ones on standard Ctrlr buttons or panel background, then you need to open the panel in Ctrlr then select each modulator (button/rotary) and you will find color properties on the right side. Properties are depending on the type of modulator.
Belge, mon nom c’est Bontemps 😉