Per Posted October 22, 2011 Posted October 22, 2011 Hello Can anyone tell me how to find the checksum (the byte before F7) in FmBox voice/drum or ensemble files? Is it 7bit or 8bit notation, and from where to where will i have to count? Regards Per
TK. Posted October 23, 2011 Posted October 23, 2011 Hi Per, the checksum is calculated over the data part only (256 bytes) Calculation (pseudo code): // data block is located in data[] array // create sysex string: Array<uint8> sysEx; sysEx.add(0xf0); sysEx.add(0x00); sysEx.add(0x00); sysEx.add(0x7e); sysEx.add(0x49); sysEx.add(deviceNumber); sysEx.add(0x02); sysEx.add(type); sysEx.add(bank); sysEx.add(patch); uint8 checksum = 0x00; for(int i=0; i<256; ++i) { uint8 b = data[i]; sysEx.add(b); checksum += b; } sysEx.add(-(int)checksum & 0x7f); // 7bit !!! sysEx.add(0xf7); [/code] Best Regards, Thorsten.
Per Posted November 25, 2011 Author Posted November 25, 2011 Thank you Thorsten it was just what i needed and thanks for the Fm Synth its a fantastic piece of work, and what a sound :thumbsup: Best regards Per
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now