requestPatch: Hex vs. decimal string?

After working on some patch request rules, I ran into something sort of confusing.

(This is all viewed in Electra One Console). So when the Electra One requests a patch, first a big chunk of sysex comes in that is formatted in hexadecimal, which is expected, then a few lines lower, there is a line of text saying “handleIncomingSysex: received data:” and then the same hex data is listed with the byte#, and then the decimal version of that hex byte.

I assumed this was just the same data being shown formatted in both hexadecimal and then in decimal, but at some point when working on my Matrix 1000, I ran into a wall where they didn’t seem to match up anymore.

The yellow boxes show the last matching byte that I can literally count out sequentially that match. I was trying to parse and pull the byte that is in the blue box, 0Dh, but in the lower section of data, there is no 13, the decimal of 0Dh. I also noticed there are also lots of bytes with values higher than 127.

What am I missing here? It seems like the Electra One is doing its own conversion of the incoming Sysex data, as when I view the midi data within Midi Monitor, I only see the outgoing request, and incoming 275 bytes of hexadecimal data.

This might be an obvious midi data convention that I just don’t understand, but I thought if I’ve run into this, someone else might, so it would be worth asking here on the forum.


1 Like

I will adjust the log message. I am actually thinking changing the index (byte #) so that it is the position of the byte after the header. ie. it would correspond to the “byte” parameter in the rules. Also, will make it hex too. I used dec there for my own need at some point in the past.

The second issue is that the parser has a hard limit on 255 bytes. I discussed this with @akira yesterday. The fix for that is on the way. Both these things will be resolved in 1.3.3

Would those two changes address the issue I was seeing regarding the incoming sysex and parser data not matching up?

The blue box is around byte 213, so still below the 255 byte limit. And it seems like I still should be seeing “13” somewhere around byte 213 in the parser to match the “0D” in the incoming sysex dump, right?