MIDI DESIGNER
The only MIDI controller for iPad, iPhone, and Mac


Talk to other MIDI Designer users about MIDI Designer, iOS MIDI and related topics. Or share layouts, pages, and ideas.

Check out our Facebook Group.

Of course, if you want to send us an email, feel free.

Open problem reports

Summary of user requests
Most basic SYSEX questions. - MIDI Designer Q&A

Most basic SYSEX questions.

0 votes
asked Jan 26, 2019 in Advanced by ed_saxman (710 points)
recategorized Feb 2, 2019 by MIDI Designer Team (Dan)
I dont think there is such a thing a "basic" sysex question lol. Sysex by nature is complicated, so dont be worried if your having trouble with it.
;)
Cheers
Brett
Changed the category to "advanced," actually, then I read your comment here Brett.

1 Answer

0 votes
Hey there, here’s the very short, text-only answer to get you moving for now.

The thing about other types of MIDI messages — Control Change, for instance — is that they have a variable piece in them (usually the last byte). So if you set up a button in MD and set its type to control change, you can see how the ON and OFF values show up in the Log (also in MD). Basically, the last byte changes, usually from 0 to 127 (the max value for a 7-bit byte).

Sysex in MD isn’t automatically set up the same way, so there’s no variable piece. So you need to take one of the bytes and substitute it with a V in MIDI Designer. This will make that byte send out the OFF value and the ON value that you have set up in the MIDI panel.

How can you know which is the variable piece? Usually your MIDI target (thing you’re controlling) will expect two “different” sysex’s, one for ON and one for OFF. These two messages differ on only one byte. That’s the one you want to use V for.

It’s possible that it’s more than one byte, and then things get a bit more complicated. Rest-assured that MD was created from me asking these same questions about sysex, starting from Roland manuals for the HPD-15, and that stuff is all follow-your-nose in the Sysex panel in MD.

Comment on this answer (not via email) and let us know where you’re stuck and we can push this further ahead.
answered Jan 26, 2019 by MIDI Designer Team (Dan)
Well, I have been doing some homework meanwhile, trying different things.
I have tried with the new "Stream Byter", and learned how to retrieve that SYSEX message and then send another thing, but maybe I must learn the method you are trying to explain first, becouse I have reached to almost the same point. (the SYSEX was converted to a CC value, but still, a unique value)

Let me explain my lastest discoverings:
The FC-300 sends, for the low row of 5 footswitches, the following messages when the pedals are pressed:
(two values are changing)
F0    41    00    00    00    20    12    20    00    7F    61    F7
F0    41    00    00    00    20    12    20    01    7F    60    F7
F0    41    00    00    00    20    12    20    02    7F    5F    F7
F0    41    00    00    00    20    12    20    03    7F    5E    F7
F0    41    00    00    00    20    12    20    04    7F    5D    F7

Also, it sends different values when each of the footswitches is released (not sure if they are really relevant for us, so tell me if you need them)

I still dont know how to deal with two variables in MDP, so I have made some experimentation with the "V" and named ticks, using an output SYSEX chain, refered to the FC-300 LED Status(this is just an unidirectional message to the FC-300 to turn leds On):. This one was easier, becouse there is only one value changing
F0    41    00    00    00    20    12    30    00    7F    61    F7
F0    41    00    00    00    20    12    30    01    7F    61    F7
F0    41    00    00    00    20    12    30    02    7F    61    F7
F0    41    00    00    00    20    12    30    03    7F    61    F7
etc.. (continues until 09)

The only value changing was the 9th column, so I have made a control with a V, with 10 values (00 to 04 the red LEDs, and 05 to 09 for the green leds)
F0    41    00    00    00    20    12    30    V    7F    61    F7

But that was only for turn ON, so I have made the same thing again for LEDs Off:
F0    41    00    00    00    20    12    30    V    00    60    F7

So, now I have two knobs: the first to turn On the LEDs and another one that turns the LEDs Off. Great! This part worked, but it was easy: there was only one value changing, so I figured how to use the V and the named ticks. I have some ideas about how to use this for some cool things like 2 simultaneous rows of "radio buttons", something like two actions press: one tap to control snapshots 1-5 (green leds), and  double-tap (or hold) to send Program Changes 1-5.

But lets stop dreaming for now and return to our homework.

Despite my recent experiments, and after reading your answer, I still dont know how to start to make the input splits in two different values. Can you explain further, please?
Excuse me if I'm a bit dumb about all this, sorry..
We’re getting close.  So you don’t need two variables in MD, you need one, which varies based on whether the switch is pressed or not. So basically you set up five buttons using MIDI learn and they should map to the ON values. Then that byte that switches from 20 to 30 between the first set and the second set, that’s your variable.

However, here’s the annoying thing: the sysex panel in MD is specified in hex and the log is also in decimal. However, the ON/OFF propeties pane is in Decimal, so you’ve got to convert 20h (20 in hex) and 30h to decimal for that one. So for each of these switches it should produce a message from the first set when ON and from the second set when OFF.

There’s a slight chance that I’ve misread your message or completely missed the point, but I think we’re moving forward.

Particularly critical to my reading of your question and comment is that you’re willing to map one button in MD to one switch on the device... that’s right, I hope?
Yes, one button to one switch.

But I think I have confused the things trying to explain too much stuff.

When you said "Then that byte that switches from 20 to 30 between the first set and the second set, that’s your variable."....

Only the first block of sysex I wrote before (20) is refered to the initial question. Those are the SYSEX that the FC-300 sends to MDP when a FS 1-5 is pressed.

The second block with the 30 values are just messages that the FC-300 can receive from MDP to turn the LEDs On/Off. That was an example of how I figured to use the V to send those messages (with a single V), but still dont understand how to apply what you are saying to receive and use the SYSEX coming from the FC-300 (still trying).


So let me start again:

I have 5 buttons using MIDI learn with the following assignments:
(when pressed, FS 1 sends:) F0    41    00    00    00    20    12    20    00    7F    61    F7
(when pressed, FS 2 sends:) F0    41    00    00    00    20    12    20    01    7F    60    F7
(when pressed, FS 3 sends:) F0    41    00    00    00    20    12    20    02    7F    5F    F7
(when pressed, FS 4 sends:) F0    41    00    00    00    20    12    20    03    7F    5E    F7
(when pressed, FS 5 sends:) F0    41    00    00    00    20    12    20    04    7F    5D    F7

I'm confused about the two columns with values changing, what to do now?
Hey ed,
Can I suggest something, Im not sure if this will be right, Ive only worked on one Roland unit before.
I just checked the FC-300 manual and at the back (page 64-66) it has a few pages based on "how" the sysex messages are compiled.
Ok, first off, Im pretty sure your using the wrong value for your V or data.

The value which changes for "each" switch, is actually the [7F] part... (seems strange I know, bare with me) this part is important, remember, each "switch/pedal" has to have its own "address" individually, or how can it know where to send "received" values?... so each switch has to have its own identifying number. According to the manual, page 65, under Pedal Status...

Pedal 1 Address [20 00]
Pedal 2 Address [20 01]
Pedal 3 Address [20 02]
Pedal 4 Address [20 03]
Pedal 5 Address [20 04]...
etc
etc

Here those values are in your recorded data...

(when pressed, FS 1 sends:) F0    41    00    00    00    20    12    [20    00]    7F    61    F7
(when pressed, FS 2 sends:) F0    41    00    00    00    20    12    [20    01]    7F    60    F7
(when pressed, FS 3 sends:) F0    41    00    00    00    20    12    [20    02]    7F    5F    F7
(when pressed, FS 4 sends:) F0    41    00    00    00    20    12    [20    03]    7F    5E    F7
(when pressed, FS 5 sends:) F0    41    00    00    00    20    12    [20    04]    7F    5D    F7


The value, for a switch!... can really only be two states, ON or OFF. Again in the same table from Page 65 of the manual, we see that the "Data" (or the V part for MD2) is either 00/7F.
 7F is actually the highest value you can send with 1 byte of midi (midi only uses 7 bits). The lowest value is 00, so when manufacturers need to represent two states, as in ON or OFF, they usually go for 00/7F, lowest and highest value in one midi byte.

You mentioned that the unit sends "two" messages for a foot switch hit, one message for pressing down, another for lifting your foot off. Im betting the messages for the foot off will be as follows...

(when depressed, FS 1 sends:) F0    41    00    00    00    20    12    20    00    "00"    **    F7
(when depressed, FS 2 sends:) F0    41    00    00    00    20    12    20    01    "00"    **    F7
(when depressed, FS 3 sends:) F0    41    00    00    00    20    12    20    02    "00"    **    F7
(when depressed, FS 4 sends:) F0    41    00    00    00    20    12    20    03    "00"    **    F7
(when depressed, FS 5 sends:) F0    41    00    00    00    20    12    20    04    "00"    **    F7

Notice the 7F is now 00 or in other words, OFF. (I cant test this mind you, this is just an educated guess ;)

The byte that I have replaced with ** is the checksum value. This always changes with every packet of data. It has nothing to do with values nor address, its for error checking. You can easily add this in MD under the sysex page, theres a section to add many different Checksum routines, as each manufacturer uses different checksums, some manufacturers don't even use them at all. The only way to know is to read the Midi Sysex manual for the device your working on... (yeah..prepare to go to sleep fast, its boring shit! lol)

Hope this helps, your close mate, but Im betting those pages in the manual will help you a lot. Let me know how you go.
Cheers
Brett ;)
Hi, thedood! Thank you for your input, really appreciated!
I was already reading the manual, this is the set of SYSEX I'm working at: https://www.flickr.com/photos/159493056@N07/31950346817/in/dateposted-public/

And this is the real translation to SYSEX commands:
https://www.flickr.com/photos/159493056@N07/31950346137/in/dateposted-public/

The empty cells means "same as above".

It seems like I will need to learn about that checksum value, and how use that in MDP, then.

I have found some useful links to start:
http://www.2writers.com/eddie/tutsysex.htm
http://www.2writers.com/eddie/TutHex.htm
(note: this "eddie" is not me)
Hey Eddie.
Youre on your way now mate. Those SYSEx sheets are perfect, even simpler than the manual.

Check sums are really easy using MD. When your in the page that lets you enter your sysex, just use the +- buttons next to checksum to enter in which manufacturer your using. As you will see the first one on the list is Roland, simply select that and MD2 will do the rest...easy. (As in inserting it into the stream).
For example, Im working on an EMU Planet Phatt currently and EMU dont use checksums at all, so I just leave it blank. It all depends on the manufacturer and their specs.
Great tutorials too, they are way useful. In another week or so Ill be asking you how to do stuff!
Cause believe me SYSEX still confuses the crap out of me at times lol
Take it easy.
Brett ;)
Ed, the checksum is a byte (or more) that Roland specifies has to contain a calculated value which proves that the MIDI message hasn't been corrupted. So that changes for each MIDI message, but if you tell MD where to put and how many bytes it needs to be, it'll do that work for you.
Good news guys, I've got something!!

This is what I did:

Original SYSEX chains:
(when pressed, FS 1 sends:    ) F0    [41    00    00    00    20    12    20    00    7F    61]  F7
(when depressed, FS 1 sends:) F0    [41    00    00    00    20    12    20    00    00    60]  F7

Then, in MDP:
- New Knob
- Set # of ticks: 2
- MIDI sysex properties: 41 00 00 20 12 20 00 V (I'm omiting the last byte, the checksum value [61])
- Checksum*: Roland (...and MDP is putting the checksum back again, isn't it?)
(*To Dan: There is a lost-in-translation mistake in MDP [when in spanish] in this field that is very confusing. It should say "Checksum", but it says "suma de v...". This term [checksum] should not be translated at all)
- Bytes value: 1
- MIDI Min>Max: (default) 0>127 (not using named ticks now, just the default values. So the V should contain these values [please correct me if I'm wrong])

Now, the knob reflects the behaviour of the pedal: it goes to the right while the pedal is pressed, and it backs to the left when the pedal is depressed.


I can repeat the process with all 5 footswitches, using (for each 2-ticks knob in MDP):
 41 00 00 20 12 20 00 V
 41 00 00 20 12 20 01 V
 41 00 00 20 12 20 02 V
 41 00 00 20 12 20 03 V
 41 00 00 20 12 20 04 V

So now I have five 2-ticks knobs that responds like momentary buttons.

I have supossed that each those knobs can be supercontrol of a Toggle button, but.... the button still do not toggle.

We are probably closer, guys! Thank you both for your support.
One hour later...

I have found a workaround to Toggle, but this seems too complicated to me:

Knob 1 (as mentioned in my previous post) >> momentary button >> XFader (2 ticks) >> Toggle Button

There must be an easier way, isnt it?
I haven’t read this that closely this morning, but some quick notes: 1) I’ll fix the translations, that shouldn’t be translated ;) 2) If you can represent what you want to send with ONE button and MIDI on and OFF values, then do that. Otherwise, if you truly need different MIDI messages, then the easiest way (which is almost the same as what you did) is either button controls knob controls two subcontrol buttons (button group) and the button group super is set to “buttons send on only”...

Ed can you simplify this all for me and give me just, for ONE example, the ON message and the ON message? Also tell me which byte(s) is the checksum.

thanks!
Dan
Hi Dan!
The example would be the same I have been posting over and over:
— The first FC-300 Footswitch (labeled 1/6) sends two messages when is used:
(when pressed, FS 1 sends:    ) F0    41    00    00    00    20    12    20    00    7F    [61]  F7
(when depressed, FS 1 sends:) F0    41    00    00    00    20    12    20    00    00    [60]  F7

The checksum is the byte between brackets.

This value never changes. I mean, the FC-300 sends fixed checksum values.
Glad I asked. I’m pretty sure we can do this easily. I’ll make you an example in next 24 hours
Thanks Dan, it will be perfect to learn different ways of doing things.

Personally, I have found another way to deal with the Checksum Byte!

Keep in mind that this is not really necessary, because MDP can handle the Checksum byte as mentioned above, but it's interesting anyway.

I have used a very simple input rule in the Stream Byter plugin:

ASS M9 = M9 00 F7

That means something like:
"starting on the 10th Byte (9 counting from 0) of any input message  = Left 10th as it is (our value to On-Off), Set 00 to the 11th Byte (Checksum), Set F7 to the last Byte (End of SYSEX)"

In this way, every input message coming from the FC-300 will have the same checksum value (00) after being processed by the Stream Byter input rules.

So, the previous example will become:
(when pressed, FS 1 sends:    ) F0    41    00    00    00    20    12    20    00    7F    [00]  F7
(when depressed, FS 1 sends:) F0    41    00    00    00    20    12    20    00    00    [00]  F7

Just an exercise to learn new things, but interesting anyway, isn't it?
I merely put this in the bytes: 41 00 00 00 20 12 20 00 V

Then I added a Roland 1-byte checksum.

I left the ON and OFF values for the button where they are, but you probably want to invert them.

This is my log output

Message Out: Length=12: F0 41 00 00 00 20 12 20 00 7F 2F F7
Message Out: Length=12: F0 41 00 00 00 20 12 20 00 00 2E F7
Message Out: Length=12: F0 41 00 00 00 20 12 20 00 7F 2F F7
Message Out: Length=12: F0 41 00 00 00 20 12 20 00 00 2E F7

and then MD should be able to handle all values coming in. Sorry, there's a lot of text here, what am I missing?
Is it that the checksum is wrong? You're putting 61 and 60 inside brackets way above. If you need those values, then you'd need two buttons with the fixed values, a supercontrol and another button spinning the supercontrol.

However, I should be worried that the Roland checksum math is wrong on my end, but I've been through this dozens of times before and in the end the checksum always proves out. Hmmmm....

There are extensive unit tests in the MD code around this topic, which was the only way to get some sanity on it. I'd be very surprised if we're doing it wrong, yet... not sure why those MIDI values would be so weird.
The checksum inside brackets is correct (61 and 60). These are the values (empty cells means "same as above"): https://www.flickr.com/photos/159493056@N07/31950346137/in/dateposted-public/

And yes, my log output is the same as yours (2F and 2E) as output values from the button (it should be 61 and 60), but.... still, it works!:
The button responds correctly to incoming messages (from the FC-300) with 60 and 61, but when the button is pushed "manually" (in MDP), then it sends 2F and 2E.

That was the same I was doing so far, so I was thinking I probably did something wrong.

The most strange thing is that despite the mismatched checksum values, it works as intented anyway! (dont ask me why)

SYSEX is really a dark art, fellas.

PD to Dan: Do you have a FC-200, isnt it? I think I remember seeing it in some of your videos. The SYSEX implementation is quite similar, if not the same, based on what I could read in the manual.
Ed Saxman, I'll check if we still have one. Yes, MD just discards the checksum on the way in. What I don't get is that our Roland sysex implementation for one-byte sysex has been working since 2011 without issues and it hasn't changed. So... is it an issue that we're sending a different outgoing sysex? What are you controlling, the pedalboard itself?

It's not impossible to think about adding a second roland 1-byte sysex type, I just don't know where I would get the calculations. Perhaps in the FC300 manual?
The only thing the manual mentions about the Checksum is: "The error-checking process uses a checksum that provides a bit pattern where the last 7 bits are zero when values for an address, size, and that checksum are summed."

But no, this isn't a issue for me at all, becouse its working anyway.

I'm controlling a third device too, but the SYSEX only relates to the FC-300.
By the way: I have noticed that the Checksum Byte doesn't matter at all when sending input SYSEX messages to the FC-300. Any checksum value works (for example to turn on/off leds, or sending text to the screen)

My setup is: FC-300 >> Roland UM-ONE MkII >> Apple CCK USB3 >> Ipad Air >> MDP
The third device is an HX Stomp (or a Helix Floor) using a Yamaha MD-BT01 both connected wirelessly to the ipad >> MDP

Currently, I'm using Stream Byter ouput rules to capture what my MDP template sends, so both devices are being controlled, although the FC-300 also acts as a controller. Crazy, isn't it?

And so far so good! I really like how Stream Byter is integrated with MDP, its a really powerful tandem.
I can use the FC-300 to receive text, control all the leds in different ways, take control over the 3 digit-7 segment screen, use both expresion pedals... almost everything so far.

IMHO, Stream Byter is to IOS almost what Bome MIDI Translator is for IOS/Windows. Really great tools (and deep rabbit holes! ;-)  ).
...