Re: midiMessageRecieved values for modulators

Home Forums General Programming midiMessageRecieved values for modulators Re: midiMessageRecieved values for modulators

#4427
atom
Keymaster
  • Topics: 159
  • Replies: 2945
  • Total: 3104
  • ★★★★★

You are trying to fetch a byte range from a SysEx message, in case of $21 in the manual the table at page 149 states, that the program data starts at byte 41 (16 bytes for name, 16 spare bytes, 2 bytes that make the version and the message header). So the program data is at byte 41 to the end -1 (-1 cause sysex ends with F7 always and it’s not part of the data).

[code:73duk4gu]
programName = midiMessage:getLuaData():getRange(7,16)
programData = midiMessage:getLuaData():getRange(41, 261-41-1)
[/code:73duk4gu]

AND have a look at page 155
[quote:73duk4gu]
The patch data is viewed as a bit stream where the different parameters only use as many bits as necessary for their actual format. All parameters are oriented with the most significant bit first. An 8-bit
checksum is calculated over the entire data block and stored as the last 8 bits of the file. The checksum
is calculated by adding all data Bytes together.

[b:73duk4gu]Since a MIDI SysEx data Byte can only contain 7 bits,
the bit stream is 8 to 7 bit converted to fit the MIDI format[/b:73duk4gu]
[/quote:73duk4gu]

that means that these bytes are converted to fit the 7bit format that MIDI takes, now i’m not sure what does that mean in this case, but all bytes that are longer then 7 bits will be encoded in some way.

Ctrlr