How to represent received sysex #544
-
Hey eveyone! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
Greetings, Which version of Ctrlr are you using? |
Beta Was this translation helpful? Give feedback.
-
Salut Jojo, your panel crashes CTRLR. CLICK THE CANVAS and OPEN THE PANEL MODE cmd+E, it's in the middle: This script has to filter to listen only sysex messages, decode it (to get the values of the different parameters), then update the values of the corresponding panel modulators. to filter sysex messages on input it works with : The rest is almost the same as in the following solution by John @dnaldoog but this is for for cc values. You'll need to locate the parameter position and its value in the message though: |
Beta Was this translation helpful? Give feedback.
-
Thank you both i got it to work. I have one futher question. I have a very large sysex file > 20kb here is the beginning:
I wanna do a button to send the whole message at once but I need a buffer like a delay between every F7 F0 . Anyone knows how to do this in lua? Thank you |
Beta Was this translation helpful? Give feedback.
-
It looks like your sysex in the file has different sizes. You need something like:
sendBufferContents = function() panel:setProperty("panelMidiGlobalDelay", 300, true) local start, eox = 0, 0 -- initialise for i = 0,buf:getSize() - 1 do if buf:getByte(i) == 240 then -- F0 start of message start = i elseif buf:getByte(i) == 247 then -- EOX F7 end of message eox = i panel:sendMidiMessageNow(CtrlrMidiMessage(buf:getRange(start, eox - start):toHexString(1))) end end end You don't need a timer to delay between messages - you can use:
|
Beta Was this translation helpful? Give feedback.
Salut Jojo, your panel crashes CTRLR.
I didn't understand exactly what you need.
A sysex message is received by ctrlr, you want to update a specific modulator value from the sysex message right?
It starts with a LUA script assigned the global panel properties "when a panel receives a midi message":
CLICK THE CANVAS and OPEN THE PANEL MODE cmd+E, it's in the middle:
This script has to filter to listen only sysex messages, decode it (to get the values of the different parameters), then update the values of the corresponding panel modulators.
to filter sysex messages on input it works with :
if midi:getType() == 5 then -- it is a SYSEX message
The rest is almost the same as in the following…