Help with SysEx string formatting for Roland DEP-5 panel #722
Replies: 3 comments 10 replies
-
Unsubscribe
…On Sat, May 24, 2025, 04:45 Bennettistas ***@***.***> wrote:
Hello everyone,
I'm currently building a Ctrlr panel for the Roland DEP-5, and I’ve been
able to make some progress—basic MIDI communication is working, and I can
send and receive SysEx data to/from the unit. However, I’m struggling with
how to correctly format the SysEx strings in the "Custom MIDI Message"
field of each modulator.
I understand the basics, like using F0 ... F7, and that I can insert
variables like ms, ls, or value where needed. But I’m not entirely sure how
Ctrlr handles these internally, or how to correctly position the value
bytes inside the message. Also, how do I handle fixed bytes that shouldn’t
change (should I use XX for those?), and how do I ensure the checksum is
calculated correctly?
For example, I want to control the Reverb Time parameter, which seems to
be located at a specific byte offset in the DEP-5’s All Parameter Receive
(APR) message format. Here's the SysEx structure I’m using:
F0 41 35 00 52 20 01 <0X XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
XX XX XX ms ls XX XX> F7 <string
The format in the manual is set to 0vvv vvvv : 0vvv vvvv (in a 24 bytes
format string), and in this case what I want to change is in the bytes
21/22. It's says something about nibble pairs, but I really don't
understand.
Can somebody help me with this?
Thanks in advance!
—
Reply to this email directly, view it on GitHub
<#722>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4MBOFBCODUWKNP5G6LGT3ABLT7AVCNFSM6AAAAAB52PA3ISVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGM3DOOJRGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It looks like the data for a parameter is sent as 4 bit nibbles. As you say, from the manual it looks like 24 parameters are all sent out as one message. So it's probably best to do that in a lua callback function: (1) First name all your modulators exactly as in the manual. From experience this works best - forward slashes etc are fine parameters = { "REVERB SELECTION", "OUTPUT LEVEL", "Q OF MIDDLE FILTER", "FREQUENCY OF MIDDLE FILTER", "BOOST/CUT OF LOW FILTER", "BOOST/CUT OF MIDDLE FILTER", "BOOST/CUT OF HIGH FILTER", "FEEDBACK OF CHORUS", "RATE OF CHORUS", "DEPTH OF CHORUS", "ALGORITHM", "PRE DELAY or DELAY TIME", "REVERB TIME or FEEDBACK OF DELAY", "HF DAMP or GATE TIME" } function sendData() --create a Memory Block (data to send) local channelOut = panel:getProperty("panelMidiOutputChannelDevice") - 1 local m = MemoryBlock("F0 41 35 00 52 20 01") m:setByte(3, channelOut) -- set the channelOut for i, v in ipairs(parameters) do -- now get all the values as 4 bit nibbles local value = panel:getModulatorByName(v):getModulatorValue() if i > 4 then -- create nibbles -- add each 4 bit nibble set to the message local msb, lsb = create4n(value) local tmp = MemoryBlock(string.format("%.2x %.2x", lsb, msb)) -- note lsb is first m:append(tmp) -- add each 4 bit nibble set to the message else -- not a split number m:append(MemoryBlock(string.format("%.2x", value))) end m:append(MemoryBlock("F7")) -- EOX end panel:sendMidiMessageNow(CtrlrMidiMessage(m:toHexString(1))) end ----------------------------------------------------------------- function create4n(n) -- convert integer into two 4 bit nibbles local bv = BigInteger(tonumber(n)) return bv:getBitRangeAsInt(4, 4), bv:getBitRangeAsInt(0, 4) end Done! Now if you need to decode 4 bit nibble incoming you can use this function: function combine4n(a, b) -- convert two 4 bit nibbles to a single integer local m = bit.lshift(a, 4) return m + b end |
Beta Was this translation helpful? Give feedback.
-
...and then recommended to send all MIDI when using a mouseUp event on each of the 14 controls. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm currently building a Ctrlr panel for the Roland DEP-5, and I’ve been able to make some progress—basic MIDI communication is working, and I can send and receive SysEx data to/from the unit. However, I’m struggling with how to correctly format the SysEx strings in the "Custom MIDI Message" field of each modulator.
I understand the basics, like using F0 ... F7, and that I can insert variables like ms, ls, or value where needed. But I’m not entirely sure how Ctrlr handles these internally, or how to correctly position the value bytes inside the message. Also, how do I handle fixed bytes that shouldn’t change (should I use XX for those?), and how do I ensure the checksum is calculated correctly?
For example, I want to control the Reverb Time parameter, which seems to be located at a specific byte offset in the DEP-5’s All Parameter Receive (APR) message format. Here's the SysEx structure I’m using:
F0 41 35 00 52 20 01 <0X XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ms ls XX XX> F7 <string
The format in the manual is set to 0vvv vvvv : 0vvv vvvv (in a 24 bytes format string), and in this case what I want to change is in the bytes 21/22. It's says something about nibble pairs, but I really don't understand.
Can somebody help me with this?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions