Sysex Hex v Decimal

Ben Hogan's icon

Hi there,

I'm having tremendous trouble using sxformat to communicate with my Roland RD-800. It looks like part of the issue is the conversion between hex and decimal.

By default, sysex device IDs are 0x10. The RD-800 MIDI Implementation Guide acknowledges this and suggests using that value. But the User Manual says 'make sure to set device ID to 17'. This was initially confusing but some Googling pointed out that it may be the difference between 0- and 1-based numbering systems.

So my questions are:

(A) Do you need to take 0- vs 1- based numbering into account when using sxformat and nudge your arguments accordingly? If so, which bytes are affected?
(B) Are there easy ways to send out sysex from Max *without* going through decimal? (Lobjects' lsx has been giving me trouble - It looks like Peter Elsea might not be supporting that anymore.)
(C) Are there any radical alternatives?

My end goal is to convert incoming MIDI CC to sysex and use that to control the harmonic drawbars on my RD-800.
MacBook. El Capitan. Max 7.1.0 in 64 and 32-bit modes.

redhexagonal's icon

Im not sure what you mean by 0 vs 1 numbering -do you mean decimal vs hexadecimal? Documentation can be confusing, but its usually written as hexadecimal, so 17 is 23 in decimal. 0x10 is 16 in decimal.

I use zl alot to manipulate and format sysex. You can just format in decimal and send those bytes from a midi port if you find sxformat confusing.

Ben Hogan's icon

Hi Staplesyrup,

If there was an 8-bit MIDI volume knob it would count from 0 to 127, giving 128 distinct levels.

By contrast, decimal volume knob labels generally start from 1 (e.g. 1 to 10 or 1 to 11 if you're Spinal Tap).

That's what I mean by 0- vs 1-based numbering systems. We tend to count from 1 in decimal, but almost always from 0 in hex. I'm worried that strict mathematical conversion of hex to decimal in sxformat is a source of my problems.

Thanks for letting me know about zl! I'm worried I'll still get the same issues having to work in decimal but here goes :)

redhexagonal's icon

1 in hex is still 1 in decimal , it doesnt matter where you start counting.
0-127 only uses 7 bits. You cant send 8bit data with sysex, with MIDI the 8th bit is a status byte like note, pitch bend, start of sysex, end of sysex.

Ben Hogan's icon

Thanks again -

'1 in hex is still 1 in decimal': Point taken. I guess the way it's discussed in application (device 0x10 is called device 17) doesn't necessarily reflect the underlying commands (0x10 is still 16 in decimal).

'You can't send 8bit data with sysex' - My mistake yes of course a MIDI byte only ever uses 7 of 8 bits.

I've switched to Bome's MIDI translator for now and have had some effect with one sysex command but no luck with any others (this is all in hex). This area is really frustrating.