Page 1 of 1

Need help with Nord Lead 3 patch checksum calculation

Posted: 17 Dec 2022, 16:25
by Renderrocks
Hello everyone,

I'm trying to understand the checksum algorithm for a Nord Lead 3 sysex patch, but I'm having trouble interpreting the documentation.
The documentation states that the patch data is viewed as a bit stream, and that the different parameters use as many bits as necessary for their actual format.
It also says that an 8-bit checksum is calculated over the entire data block, and stored as the last 8 bits of the file.

The documentation goes on to say that the checksum is calculated by adding all data bytes together, and that the bit stream is 8 to 7 bit converted to fit the MIDI format.

Has anyone here worked with Nord Lead 3 sysex before, and can explain the checksum algorithm in more detail? I would really appreciate any help or guidance on this.

Thanks!

Re: Need help with Nord Lead 3 patch checksum calculation

Posted: 17 Dec 2022, 19:48
by 23skidoo
Yes, I've decoded and written it successfully using custom parsers in Swift, and Go. It's exactly how it's described: in the sysex dump you get a string of bytes, all with the high bit 0. Take the lower 7 bits of each byte and concatenate them sequentially into a new string of bytes, with the first byte having 7 bits from the first sysex byte and 1 bit from the second, the second byte having 6 bits from the second sysex byte and 2 from the third, etc. The unpacked bytestream is now the actual NL3 patch data, in compact (struct-ish) form.

As for checksum, it's just a running sum into a uint8 (allowing overflow) of each byte in the patch payload. If you can read go, here's a full parser/decoder implemented here, with checksum: https://github.com/malacalypse/go-nordlead3

Out of curiosity, what are you trying to do with it, and for what project? As a MIDI/sysex hacker with an NL3, I'm always interested in seeing what others are doing.

Re: Need help with Nord Lead 3 patch checksum calculation

Posted: 17 Dec 2022, 20:24
by Renderrocks
I am developing a patch editor and manager in Ctrlr

Thank you for your answer. I will definitely check it out.

Re: Need help with Nord Lead 3 patch checksum calculation

Posted: 21 Dec 2022, 04:10
by Mr. Marko
excellent news