0

I'm looking through this old manual trying to decipher the information contained in an old sysex file (MIDI stuff). There's a section explaining how the numbers are "nibble-ized" to fit the "7-bit MIDI protocol"... and then explains how to arrive at the hex value for the bytes representing signed data values. Then they give an example... am I missing something or is the example just wrong? -127 + 16384 is 16257, not 16252... right? So then -127 would actually have its lsb be the remainder of 16257/128 which is 1 (01 in hex), and the msb would be the whole number component of the result of that division, which is 127 (7F in hex). So 01 7f. Is that right?

I've included the section below:

enter image description here

stillsleep
  • 41
  • 5
  • *So 01 7f. Is that right?* I would expect more 1 bits in the first byte when encoding a small negative number. For example, a -1 should convert to 7F 7F, yes? If we convert backwards from their 7C 7E then we do get their original 16252, which gives us -132. So, yes, something goofy in their first step. Also, 16384-127 = 16257 vs their 16252. So perhaps just a typo, confusing the last digit 2 vs. 7? The old document might have been typed in from someones hand-written notes at the time. – aMike Jun 17 '23 at 12:30

0 Answers0