SysEx Checksum

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

SysEx Checksum

Post by vmollov »

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!
Mof
Posts: 14
Joined: Sat Apr 18, 2020 2:42 am

Re: SysEx Checksum

Post by Mof »

If you have got AUM, you can do what you want and integrate this with Midiflow quite easily with the addition of a free AUv3 app/plugin called StreamByter and using VIrtual Inputs/Outputs on Midiflow.

I have a number of vintage synths and hardware sound modules and do similar things with complex system exclusive messages and so far there is nothing I have come across I can't solve with Midiflow, AUM, and Streambyter.

Essentially, I configure Midiflow to use Virtual Inputs/Outputs as logical endpoints for each of my synths. I then use the Midi Router in AUM to route the Midi In (the hardware synth is attached to) to the Midiflow Virtual Input. The Midiflow Virtual Output in AUM then gets mapped to a Streambyter AUv3 instance in a midi strip. That AUv3 instance output is then routed to the Midi Out for the hardware.

Using this scenario, I can script StreamByter to intercept a controller and then send out one or more System Exclusive Messages. Granted there is a learning curve for Streambyter, should be a fairly trivial Streambyter script to do what you need. It has a rudimentary math operations that can do a mod like you specified.

Even without streambyter, I find this a very useful approach to take as it allows me to load different AUM sessions with different hardware to Midiflow input/out mappings depending which of my Midi Interfaces I might be using at any given time (meaning my Midiflow presets become independent of my midi I/O assignments).