unpacking monomachine sysex data
I am trying to unpack a kit dump from a Monomachine, without luck. Here is the description in the Monomachine sysex documentation of how to do it.
Conventions in this document
Bits are labeled from 0 and upwards. 7 bit data are referred to as data.
8 bit data are referred to as bytes.
How the checksums are calculated
The checksum is generated from the data marked in blue in the tables. It is the lower 14 bits of the sum of all the indicated data.
How the message length is calculated
The length at the end of the message is the number of bytes starting from version and ending with the checksum.
Packing Method
All dump packages on the Monomachine are packed. After that they are 7-bit encoded.
To unpack check if bit 7 is set. If it is the low 7 bits indicate that the next byte should be repeated this number of times in the resulting unpacked data structure.
If bit 7 is not set the byte should just be stored in the unpacked data structure. An 8-bit data, XX, repeated 1 time is encoded 0x81 XX.
A 7-bit data, YY, repeated 1 time is encoded YY.
How the 7 bit encoding is generated
As a SysEx message only allows 7 bit data, 8 bit data blocks are converted as follows:
The first data contains the MSB of the following, up to, 7 data, data[0..6]. Bit 6 is the MSB bit of data[0] and bit 0 is the MSB of data[6]. 7 bytes encodes to 8 data. 8 bytes encodes to 10 data.
Can anyone help me perform this wizardry?
By the way, did you figure this out?
I did, yes. I have a patch but I can’t remember exactly how it works. Sysex can became an unhealthy obsession . Are you trying to unpack a kit dump?
I'm working in a similar sysex space right now and have code lying around to do this conversion. In case you were still trying to make it work, I was hoping to make your day. It's a common pattern for nearly all of the Dave Smith/Sequential instruments, Korg 01/W and a few others.
I'd like to see how you do the conversion. This is how I unpacked a Monomachine kit
Apropos of nothing, the MIDI File Dump format is very similar, but the packed MS byte is in exactly the opposite bit order (00 A7 B7 C7 D7 E7 F7 G7). I'm not aware of any synths offhand which use this format.