Skip to content

2 SysEx arrays to potentiometer #249

Answered by franky47
RiNoize asked this question in Q&A
Discussion options

You must be logged in to vote

From what I can see, the only thing that changes in those messages is the last 5 bytes of data (ignoring the last 0xf7 byte that marks the end of the SysEx message).

Those 5 bytes represent the value, and there is actually only one message: negative values in binary are represented using two's complement.

Now in the case of SysEx, there's a little extra trick: all data bytes have to be between 0x00 and 0x7f. That's because values with a most significant bit (MSB) of 1 (0x80 to 0xff) represent status codes and other control commands in the MIDI protocol.

From what we can see in the encoding of the -1 value (0x0f 0x7f 0x7f 0x7f 0x7f), we have 32 bits of data: that's a four byte value, sprea…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RiNoize
Comment options

Answer selected by RiNoize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants