SysEx Checksum

Want more stuff in Midiflow? Let us know!
Post Reply
vmollov
Posts: 1
Joined: Thu Feb 04, 2021 6:03 pm

SysEx Checksum

Post by vmollov » Mon Feb 08, 2021 9:02 pm

Let me start by stating that your app is awesome! Thank you for creating/maintaining it! I understand it is a lot of work.
I would love to see a mechanism for calculating checksum for remapping to sys ex messages using various algorithms.
My use case is:
I have a midi pedal that is configured to emit CC#11 messages with values 0-127. I would like to use it with a Roland instrument, which for some reason implements expression control through SysEx messages. Roland's intent is for the instrument to be used with a FC-300 foot board in SysEx mode. After reviewing the foot board documentation I was able to figure out the messages I need. Problem is, there is a requirement for checksum bit, which is dependent on the value in the data bit. I would like to use Midiflow to map CC#11 messages to SysEx messages using the value but also calculating the checksum, which can be derived from the value and it is in a linear set of numbers.
So the format of the outgoing messages I need is F0 41 00 00 00 20 12 24 00 vv cs F7 where vv is the value from CC#11 and cs is the calculated checksum.
For expression value 0 then I need outgoing message of F0 41 00 00 00 20 12 24 00 00 5C F7, then for 1 it would be F0 41 00 00 00 20 12 24 00 01 5B F7 all the way to F0 41 00 00 00 20 12 24 00 7E 5E F7 for 126 and F0 41 00 00 00 20 12 24 00 7F 5D F7 for 127. As you see the checksum is a linear progression decreasing from 5C as expression value goes up and mod of 128.
As you probably know, this is the Roland algorithm for calculating checksum.

I suppose I can create a mapping for every single value but that managing 128 remapping configurations seems a bit daunting.

Thank you!

Post Reply