Re: Question on QS sysex specs doc


[ Follow Ups ] [ Post Message ] [ The QuadraSynth Forum ] [ FAQ ]

Posted by Dan Halbert on November 11, 1997 at 08:32:00:

In Reply to: Re: Question on QS sysex specs doc posted by Jason Peter on November 10, 1997 at 22:19:01:

: : For you computer folks, consider the bytes in a "little-endian" fashion.
: : For the rest of you, it helps to write out the data bytes from right-to-left
: : (the bytes, not the bits inside them), even though you would normally see them
: : left to right.

: OK, so here's a good one...
: If the transmission format is little endian, is the storage format of the sysex file little endian or does that depend on your platform? (i.e. Mac vs. PC)

Nope. The transmission format is not endian - it's just sequences of bytes. The storage format is also just sequences of bytes, so it's the same on both platforms, and you don't have to do any translation when moving files between platforms of opposite endianness (thank goodness!).

Little-endian vs. big-endian only becomes an issue when you are trying to interpret pieces of data that span more than one byte. You need to know, for instance, whether the "first" byte of a two-byte integer is the low or high byte. If low, it's little-endian; if high, it's big-endian.

My interpretation of the Alesis SysEx docs is that their data is little-endian, because of the way that values that span more than one byte are laid out. When a value spans two bytes, it includes the top bits of the lower-numbered byte, and the low bits of the higher-numbered byte.
See, for instance, how the Program Name characters are laid out in the Program Data Format. Program Character 1, for example, is 2:5-1:7, i.e., from the 7th bit of byte 1 to the 5th bit of byte 2:

22222222 11111111 00000000 byte number
76543210 76543210 76543210 bit number
--pppppp p------- -------- ppppppp is Program Char 1; - are other params

Dan




Follow Ups: