Forum Replies Created
-
AuthorPosts
-
Did anyone succeeded to have this function working? Tried without success, returned table is always empty…
Setting Custom group index to some modulators to 1
then in Lua:tSub={} tSub = panel:getModulatorsWithProperty("modulatorCustomIndexGroup","1") console(tostring(#tSub))
Always giving a size of 0, whatever property I’m trying 🙁
I have also checked the Github code and it seems OK (scans all modulators and make a match on property and value to store in an array)Interesting about CtrlrLuaMemoryBlock(). Was not aware of that one but I’m only using 5.3.201
You will find the available functions in the Juce API documentation at
https://docs.juce.com/master/classes.html
Btw, this is valid for many objects used in Ctrlr. First look in Juce API then pray if they have been implemented (bound) in Ctrlr. Most are.My most used commands are:
– memory block creation
ProgramFileData = MemoryBlock()
– memory block copy to a new one
mbName = MemoryBlock(mbNameEmpty)
– copy a memory block into another one
LoadedProgramData:copyFrom (mbName, 465, 11)
– size check
ProgramFileData:getSize()
– Filling amemory block from a file
file:loadFileAsData(ProgramFileData)
– extracting single byte
LoadedProgramData:getByte(6)
– extracting range of bytes
LoadedProgramData:getRange(440,15)
– setting a byte
LoadedProgramData:setByte(6, modOsc1Tune:getModulatorValue())What is not working (bad implementation?) is to create a memory block containing predefined data (by default a memory block is empty).
So, to achieve this, I pre-define memory blocks like
mbNameEmpty = MemoryBlock ({0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
Then I use it to fill the memory block I’m using
mbName = MemoryBlock(mbNameEmpty)They are really great and easy to use for all your file manipulations
May 8, 2020 at 2:39 pm in reply to: Midi Value LUA calculation method in Ctrlr [Two’s complement, Frac Table] #118270Extremely nice panel! Currently chasing a DP4 so…
Yep the functions explained by dnaldoog are the ones I typically use and explain in all my Ctrlr forum posts since long.
xxx_OnClick: to display some info when mouse is down
xxx_OnChange: action when mod is changing value
PositiveValue_OnChange: one method for all 0..n type of mods
NegPosValue_OnChange: one method for all -/+ type of mods
OnOff_OnChange: for double switches
TripleSwitch_OnChange: for all triple switchesMay 6, 2020 at 12:14 pm in reply to: Midi Value LUA calculation method in Ctrlr [Two’s complement, Frac Table] #118217Ha, it is on a DP4 that you are working! Nice unit and would really like to have one 😉
Different things that might help you:
– as dnaldoog said; use setValue(xx, true) to set a value and use getModulatorValue() to get a value.
– when you are doing your panel design and want to handle several things with the same modulator, reduce your problem to test your way of working / idea; So here, starts with 3 or 4 algo max and 4-5 modulators max.
– do not think only Ctrlr but also Lua. I learned Lua as I discovered Ctrlr and it is a very powerful language.
I don’t know if you are aware that you can work with named indexes in tables.
You can have tModMin[“Effect1”][1] = xxx for example which would contain the minimum value of mod1 for Effect1.
As you are using a string to identify the index you can also put that in a variable.
tModMin is a table that would contain all mods min values for all effects.
– define all your modulators at once in a single method that you call at Panel loaded so you don’t need to repeat the “getModulatorbyName()” everywherefunction AssignModulators() -- Main Screen txtLCDprogram = panel:getModulatorByName("LCDprogram") txtLCDcategory = panel:getModulatorByName("LCDcategory") txtLCDparameter = panel:getModulatorByName("LCDparameter") txtLCDfile = panel:getModulatorByName("LCDfile") btnLoad = panel:getModulatorByName("Load") btnSave = panel:getModulatorByName("Save") btnRename = panel:getModulatorByName("Rename") btnInit = panel:getModulatorByName("Init")
– for your calculation methods, you can’t have all calculation methods in the same modulator, I’m afraid.
But you can see things in a different way. Except the Table, all are mods with 0 to N value.
Table mods: use a uiCombo component that you will update the content according to the effect
0..N mods: I would split those ones between what I call PositiveValue ones with an uiImageSlider handling an image scrolling from 0 to N and NegPosValue ones with an uiImageSlider handling image scrolling left/right according to Neg or Pos. Internally both are going 0..N but the display is different and the “Value to set when double clicked” is also different. So better to split (as well for the further calculation).At this stage, just build a simple panel with:
– a combo to select among 3-4 effects
– 4 uiImageSliders whereof 2 Pos and 2 NegPos
– 1 uiCombo
– the logic to display the right info according to the selected algo
– one PositiveValue_OnChange method for all Pos mods
– one NegPosValue_OnChange method for all NegPos mods
– one Combo_OnChange method for all Combo mods
– put all your fixed data values in tables (min, max, names, visibility…)
– later on use memoryblocks for user data / dumps (don’t look at sending/receiving yet)
If the above works fine all the rest is piece of cake (almost 😉 )Hahaha! I understand now the job influence 😉
Interesting to see you doing questions and answers 😉
I also think you are mixing a lot of things and maybe making things even more complicated than they are.
Let’s split the problem(s) in pieces…1. Only use 5.3.201 (Windows) or 5.3.198 (MacOS). They are stable and the ones to use when building panels.
Building the complete Ctrlr from source files is another story that I have never bothered because at the moment I don’t have the need for but you may of course have some. Unfortunately I cannot help you with that.2. Ctrlr crashing.
I don’t know what the messages means. I’m sometime getting an unexpected crash (even in stable version) when I’m clicking on a modulator that I want to edit. I’m doing VERY frequent saves so it doesn’t hurt my work and hopefully it doesn’t happen often.3. Ctrlr crashing when opening a panel
In that case there is a problem with your panel. You need to do 2 things: secure that Ctrlr can run again then remove the issue from your panel.To secure that Ctrlr can run again, you indeed need to go to the cache directory in AppData/Roaming/Ctrlr.
Make a backup of the file Ctrlr.settings into Ctrlr – Backup.settings (in case of).
Copy the file Ctrlr.settings into Ctrlr – Empty.settings
Edit that file with Notepad++ and remove all data between ““. This will remove the last panel loaded. Save your Ctrlr – Empty.settings file
Replace the Ctrlr.settings file with a copy of the Ctrlr – Empty.settings file.
Your Ctrlr program is now good to go.Cleaning your panel is another more tricky story and you should try to remember what you changed last before the last Save and the start of crashes.
Usually issues are coming from modulators having the same name.
You need to search in the .panel file that you edit with Notepad++ and that you can correct like that.
If you don’t find things, then one way to proceed is to remove modulators by chunks until your panel can restart correctly. By reducing the size of the things you remove,you will identify the culprit modulator.
Very easy to do with an editor: delete a chunk, save, test in Ctrlr, undo delete, do another delete, save, test in Ctrlr,…Good luck!
Do you really need 59 tabs for 59 algos? Don’t know your goal 😉
Do you need all algos and info at once?If not, then just create one button to scroll through the algos and adapt the content of a single tab according to the selected algo.
You will have to store the values of each modulator for each algo but this is also easy and can be done in different ways (for example, table for each mod with index 1-59 then you retrieve the value based on the algo number).
So, populate that single tab with the max needed then enable/disable acc. to the needs of each algo.
Easy to do, much more efficient BUT MUCH EASIER to maintain afterwards!Exactly!
Thx for the precision.
Which version of Ctrlr are you using?
5.3.201 is the recommended stable one.
There is no issue to keep Controller to None.To achieve what you want: bidirectional sysex and usage of keyboard to play the sound module, the way of working is exactly as I described and used by many users of my panels.
Example with the Neutron:
– Connect the Neutron to the computer by USB
– Connect your master keyboard / controller to the computer by USB (connecting the master keyboard by USB to the computer gives you the possibility to use it for the Neutron but also for VST plugins or other soft synths)
– Power the Neutron On
– Start the Neutron panel
– In the Midi menu, select Input – Device your_master_keyboard
– In the Midi menu, select Input – Channel 1 (set this to the Midi channel of your Neutron). This is done to receive notes from the master keyboard.
– In the Midi menu, select Output – Device Neutron
– In the Midi menu, select Output – Channel 1 (set this to the Midi channel of your Neutron). This is done to send Global Settings and Notes to the Neutron
– In the Midi menu, select Midi Thru – Input Device -> Output Device. This is done to send the received notes to the synthAttachments:
You must be logged in to view attached files.Can you describe your setup? Why do yo need Controller?
Usually you can achieve everything with just Input and Output devices then using Midi Thru : Input to Output which is redirecting the input of your master keyboard to your module through the panel.Maybe that you forgot to do what I stated just after 😉
You can see the property ID’s by switching View -> Property IDs/Names in the Ctrlr menu.
Click on another modulator to see the change.You need to click on another modulator to see the change of the properties Names to ID’s and opposite
Attachments:
You must be logged in to view attached files.Cool. Thank you dnaldoog!
Can you be a bit more precise?
This should be straightforward as all synths have On/Off switches…– what are you sending as message to “On”? Some CC, NRPN, sysex?
– what are you sending to “Off”?Build an image with 2 frames (one picture for On then one for Off).
Use a uiImageButton modulator.
Value 0 will display first image, value 1 will display the second imageStart your device
Set your Midi connection with the Midi menu
Open Midi monitor window and enable Input and output monitoring
Save, close and re-open your panel
Switch the button on your device then check the midi monitor
Should display the correct messages with values 0 and 1
Maybe you have 0 but then another value which is preventing the display of the second imageDon’t know anymore what you are looking for tbh…
You can see the property ID’s by switching View -> Property IDs/Names in the Ctrlr menu.
Click on another modulator to see the change.When I want to change something on the fly, I’m usually hiding the name label and adding a specific uiLabel modulator.
Then use classical
lblSlide01 = panel:getModulatorByName(“Slide01”) –> put this in some Init method
lblSlide01:getComponent():setPropertyString (“uiLabelText”, “Lo-Freq”)The link provided by Possemo above has changed.
here is the new link: http://www.mutools.com/info/M8/docs/mulab/using-bank-select-and-prog-changes.htmlApril 23, 2020 at 8:46 pm in reply to: Anybody have a copy of version 5.3.163 they can share? #117898Best one to use is 5.3.201. This is the one you should target.
Try modifying the code where you have issues and adjust to have it working for 5.3.201.
Good luck!April 22, 2020 at 8:34 pm in reply to: What is correct etiquette for re-using parts of someone else’s panel #117888Feel free to use the code in my Pro 2 panel (editor + librarian) and the explanations in my Step by Step guide.
Ask if you have any question.
Welcome!HxD is an easy free hexadecimal editor. You can see the hexa and corresponding values, you can visualize them by rows of 10 or 16, replace values…
Very easy and powerful when you know what you are doing 😉Didn’t use the layers until now but for your simple example it si nice and I’ll try that. Thx.
In my case, I’m using the order because sometimes I have 20 patch cables close to each other and overlapping.
Would be too complex to treat with layers. So, just re-ordering them is fine.Well…then the answer is almost there 😉
panel:getComponent("PolyDTabs"):getProperty("uiTabsCurrentTab")
will give you the tab number
-
AuthorPosts