sysex checksum calculation

benniy's icon

dear community,

i'm struggling with the calculation of a checksum for an old oberheim 6r.
i suppose it's using the roland standard (?), but somehow i can't get the algorithm right.

if i understand checksum-calculation correctly, it works following:
1) sum up all bytes up to the checksum byte
2) modulate with 128
3) subtract from 128

Max Patch
Copy patch and select New From Clipboard in Max.

anyhow my checksum never matches with the original sysex message.
any clue, anyone? i'd be gracious!

Jan M's icon

don't have the answer, and I do not work with sysex very often. But to my knowledge you should skip the first 5 and the last two bytes and therefore only use the address and data bytes. (http://www.chromakinetics.com/handsonic/rolSysEx.htm)

Max Patch
Copy patch and select New From Clipboard in Max.

... but also with this approach I don't end up with 79 .... (but with 89):

also your message looks enormously long to me. Tt's probably not conform with roland specs... but as I said not an expert.

benniy's icon

hello jan,

thanks a ton for your help. as for the lengths - i think it's correct, having read that it's always 275 bytes (for oberheim 6r) and taking into account that the example-message i'm using is an original dump from the synth (on the side: i recall my prophet 08 had something around 400 bytes, so i suppose this is a normal range).

as for your patch: i've tried slicing various bytes from the beginning (1, 3, 5..) - never manage to hit the checksum (=79) in the end, though :( you're patch, attempting to skip the first 5 doesn't appear to do so, either, so .. i guess we still haven't hit the nail on the head. anyhow, i'm gracious for your input.

Jan M's icon
Max Patch
Copy patch and select New From Clipboard in Max.

well, if you slice off the first 60 bytes, you'll hit 79. But this is in the realm of numerology, hehehe ;)

benniy's icon

hehe :) .. my despair drove me to similar approaches; though none of which my oberheim agreed upon.

Māris's icon

Hi there,
just to let know

for Waldorf's "Sreichfett" myself got correct Sysex check-sum calculation by skipping last step (subtract from 128).
***

ludo lov's icon

Hello,
I need to calculate the checksum of a sysex string (or decimal) to properly send a dump to a synthesizer. Here the method for the checksum is XOR which require to use binary according what I understood.
The method with %128 !-128 does not work in this case.
Does anyone know a way to solve a XOR checksum in MAX ?
Thanks a lot.

Source Audio's icon

All the answers have been provided in another thread.
And no one can "solve" anything, without knowing exact
checksum formula for that specific unknown synth.
If it is just XOR use lxor from Lobjects or xorlist from Jasch.

ludo lov's icon

Thank you Source Audio. This is exactly what I need.
The external object xorlist is still in 32bit but Lxor from Peter Elsea run in 64bit.

Dan Laüt's icon

Add all data. Multiply by -1 to invert. AND (&) with 0x7F to mask out the 7 low bits.
When added to the sum of the data, the result should be 0 when ANDed with 0x7F.


This works for Yamaha devices. Once you figure it out (and it took me a while) it is perfectly straightforward, so I think it applies universally. (Not sure, the IBM algorithm looks daunting.)

Max Patch
Copy patch and select New From Clipboard in Max.