Replies: 4 comments 5 replies
-
Hi, please try this one instead ;-) --
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Here is a panel that doesn't use lua. The sysex formula is NO EFFECT=0 HALL1=128 HALL2=129 ROOM1=256 ROOM2=257 ROOM3=258 STAGE1=384 STAGE2=385 PLATE=512 WHITE ROOM=1280 TUNNEL=1408 BASEMENT=1664 :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is a panel that uses lua. The code is: send_reverb = function(--[[ CtrlrModulator --]] mod --[[ number --]], value --[[ number --]], source) local bi = BigInteger(mod:getValueMapped()) local msb = bi:getBitRangeAsInt(7, 14) local lsb = bi:getBitRangeAsInt(0, 7) local sysex = string.format("F0 43 10 4C 02 01 00 %.2x %.2x F7", msb, lsb) local m = CtrlrMidiMessage(sysex) panel:sendMidiMessageNow(m) end You could also use a lua lookup table in the function mapped to send_reverb = function(--[[ CtrlrModulator --]] mod --[[ number --]], value --[[ number --]], source) local t={[0]=0 ,128 ,129 ,256 ,257 ,258 ,384 ,385 ,512 ,1280 ,1408 ,1664} local bi = BigInteger(t[value]) local msb = bi:getBitRangeAsInt(7, 14) local lsb = bi:getBitRangeAsInt(0, 7) local sysex = string.format("F0 43 10 4C 02 01 00 %.2x %.2x F7", msb, lsb) local m = CtrlrMidiMessage(sysex) panel:sendMidiMessageNow(m) end |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi everyone
I want to make a simple combox for example:
Reverb
Hall1
Hall2
every setting has a different sysex string i want to send via lua.
May someone can show me how to write this. That would be great.
I found this code but it doesnt work
`
-- Called when a modulator value changes
-- @mod http://ctrlr.org/api/class_ctrlr_modulator.html
-- @value new numeric value of the modulator
rev = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
if
combobox == 1 then
SendMIDINow(F0 43 10 4C 02 01 00 10 00 F7)
elseif
combobox == 2 then
SendMIDINow(F0 43 10 4C 05 01 00 10 01 F7)
end`
thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions