Sysex json: how to concatenate literal with value to pass as a single byte

I have a need to capture midi channel value as a virtual parameter and send it in different sysex parameter change messages. The problem is that different param changes use this channel id in different ways, in the midi implementation I am working with. For example, I have a bank select sysex which uses the channel value in a byte “Bn” where n is the channel value. I need to use the same channel value in a program select sysex which uses it in a byte “Cn”. Same channel value in an oscillator type select sysex which uses it in a byte “3n”.

How can I do this by using a single virtual parameter for the channel value? I tried monkeying around with rules array to concat literals with param values, but no success so far.

1 Like

This cannot be done in current firmware version. It belongs, however, to the planned feature of extending the SysEx variables and their handling. What you descibe is quite common. ie. forming a SysEx byte by ORing a parameter value and a constant.

As I am writing the reply I realized that you could possibly use a virtual parameter for the constant part of the byte too. But of course, it would be just an ugly hack / workaround…

1 Like

Thanks, @martin. A sysex variable feature to support this would be awesome. Thanks for adding to dev plan!

Yes, I already have added a virtual param to handle the constant part as a temp setup :slight_smile:.