Re: midiMessageRecieved values for modulators

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

#4428
Cramp
Participant
    • Topics: 11
    • Replies: 66
    • Total: 77
    "atom":9iiwtkj6 wrote:
    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:9iiwtkj6]
    programName = midiMessage:getLuaData():getRange(7,16)
    programData = midiMessage:getLuaData():getRange(41, 261-41-1)
    [/code:9iiwtkj6]

    AND have a look at page 155
    [quote:9iiwtkj6]
    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:9iiwtkj6]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:9iiwtkj6]
    [/quote:9iiwtkj6]

    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.[/quote:9iiwtkj6]

    Really appreciate your help mate
    will try now to change the code

    Ctrlr