Replies: 12 comments 19 replies
-
btw. does anyone have a horizontal slider for me? the "KnobGallery" at www.g200kg.com link for png's is dead, isn't it? |
Beta Was this translation helpful? Give feedback.
-
Is pitch a CC? I might be talking bullshit here cause I don't know sysex though so take what I say with a grain of salt |
Beta Was this translation helpful? Give feedback.
-
Hi Peter,
Hope it helps |
Beta Was this translation helpful? Give feedback.
-
This is one way to do it using a uiSlider - You can also use a uiFixedSlider. Set your uiSlider to -480 +480. I will name it pitch Set this field like this and hit enter to register the expression: Set the MIDI to sysex with a formula like In this field you need a call back function for received MIDI: The lua function in this callback will be something like: midiReceived = function(--[[ CtrlrMidiMessage --]] midi) if midi:getSize() == 11 then local MSB = midi:getData():getByte(7) * 128 local LSB = midi:getData():getByte(8) local sum = MSB + LSB sum = sum - 480 panel:getModulatorByName("pitch"):setModulatorValue(sum, false, false, false) end end Roland usually uses zero for the lowest negative I am guessing this is the case for your drum machine, but I haven't read the manual. |
Beta Was this translation helpful? Give feedback.
-
Hi Peter, So have you got it working with negatives? What is the sysex for -1? 5F 03 or 7F 7F ??? |
Beta Was this translation helpful? Give feedback.
-
Okay - I know what to do - stand by :) |
Beta Was this translation helpful? Give feedback.
-
Okay I think this is it: I didn't really read the question properly. This is the algorithm you need to pass all two byte (negative) values through: local rawValue = (msb * 128) + lsb local val = rawValue > 8191 and rawValue - 16384 or rawValue |
Beta Was this translation helpful? Give feedback.
-
Hi Peter, Do you mean you have one uiCombo with the names of all the cards that the R-8m can accept. When you select one of those options another uiCombo is repopulated with all the patches from the selected card? |
Beta Was this translation helpful? Give feedback.
-
I downloaded you panel - it looks like you have already achieved what you are trying to do? |
Beta Was this translation helpful? Give feedback.
-
You probably need to use tables with lists of each set to load. It's central to lua programming anyway. In my opinion uicombos are unstable, at least in 5.3.201 so I try to use Popups for complex stuff. Take a look here at what can be done, but it's a lot more complex to code! It’s difficult to understand what you want to do. If you can rephrase the question more succinctly I can maybe help. |
Beta Was this translation helpful? Give feedback.
-
Let me know if you have any questions. |
Beta Was this translation helpful? Give feedback.
-
Hi Peter, I am glad you sorted out the previous problem. Smoke was coming out my ears trying to decipher it! Here is code to populate a TOT=11 fillButton = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) local t = {} for i = 1, TOT do table.insert(t, mediaSelect[i]) selectMedia:setProperty("uiButtonContent", table.concat(t, "\n"), false) end end ms = {} ms.__index = function(t, k) t[k] = "(" .. k .. ") EMPTY" return t[k] end mediaSelect = {"OFF", "INTERNAL"} setmetatable(mediaSelect, ms) This is a good situation in which to use a rather more advanced lua feature called but you can also do something like: fillButton = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) selectMedia:setProperty("uiButtonContent", table.concat({"OFF", "INTERNAL","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"","EMPTY"},"\n"),false) end Simpler is better unless you want to reuse code, in which case, for me, the metatable option becomes easier to manage in fact |
Beta Was this translation helpful? Give feedback.
-
Hello to everyone,
btw. the Roland R-8m is is a parameter monster, so it makes sense to be able to set the parameters clearly with a panel, instead of using 6 buttons for every key note… uuuaaahhhh :-)
Roudabout 800 parameter or more for one patch, including 4* Performance and possibly additionally
8 * Feel Patches. I really hope, that CTRL can manage this :-)
So far the panel works as I wanted, but before I continue I have a question to the LUA experts of you.
All parameters are directly sent from the modulators via sysex, including the Roland checksum, also those that send negative values. All works perfekt! :-)
All mods are set to the correct values per sysex patch receive.
Except!!! all the modulators with negative values…(disabled at the moment) :-(
Sure, I also searched the old ctrl forum and various panels too. But, unfortunately, always affects to be „send“ the negative values, but not what to do via Lua, when receiving this values per SysEx, splitted in lsb and msb bytes.
How can I set these values to the correct modulator values? I just can't figure it out :-(
I'm sure, someone of you has an idea for me. That would be really, really helpful for me.
The modulator "Pitch" has a value range from -480 to 480, where the "0" value is at position "480".
Example for a received SysEx string: Pitch for Key C2 (24h) Instrument:
F0 41 00 36 12 01 24 02 20 39 F7 LSB -480 (Mod Value must be = 0 to set)
F0 41 00 36 12 01 24 03 7C 5C F7 MSB -480 (Mod Value must be = 0 to set)
F0 41 00 36 12 01 24 02 00 59 F7 LSB 0 (Mod Value must be = 480 to set)
F0 41 00 36 12 01 24 03 00 58 F7 MSB 0 (Mod Value must be = 480 to set)
F0 41 00 36 12 01 24 02 60 79 F7 LSB 480 (Mod Value must be = 960 to set)
F0 41 00 36 12 01 24 03 03 55 F7 MSB 480 (Mod Value must be = 960 to set)
Kind regards and many, many thanks for your help
Peter
Beta Was this translation helpful? Give feedback.
All reactions