Combined sysex decode / encode

Hello,

to control specific external hardware features I need to be able to exchange channel numbers between an incoming and outgoing sysex-stream in a midi route on the fly.

As long as the sysex string is static besides the channel number I found a workaround by using a sysex decoder followed by an sysex encoder in the midi filter to exchange the channel number in the resulting sysex.

But how can I handle this for the following examples:

001:2:0000 Sysex=F0 43 10 4C 08 00 60 40 F7 MultiPart : Ch 1 - AC2 Controler Number = 64
001:2:0000 Sysex=F0 43 10 4C 08 00 76 19 F7 MultiPart : Ch 1 - EQ Bass Frequency = 355 Hz
001:2:0000 Sysex=F0 43 10 4C 08 00 77 1C F7 MultiPart : Ch 1 - EQ Treble Frequency = 500 Hz
001:2:0000 Sysex=F0 43 10 4C 08 00 0C 3C F7 MultiPart : Ch 1 - Velocity Sense Depth = 60
001:2:0000 Sysex=F0 43 10 4C 08 00 0D 49 F7 MultiPart : Ch 1 - Velocity Sense Offset = 73
001:2:0000 Sysex=F0 43 10 4C 08 00 50 06 F7 MultiPart : Ch 1 - CAT LFO PMod Depth = 6
001:2:0000 Sysex=F0 43 10 4C 08 00 5B 05 F7 MultiPart : Ch 1 - AC1 LPF Control = -8850 cent

The resulting sysex-commands have to be the same beside the byte for the channel number (the “00” - byte here for channel 1), that shall be changed to another channel number.

So I need something like a flexible “byte value exchange” - feature here or maybe something like a sysex macro - feature.

Is there any option to handle this in Cantabile Performer 3 which i did not recognize? Or is it simply not possible?

Franziska

Hi Franziska,

you can use a filter like this to modulate values…

(only an example …not your values)

SYSEXtest

also it works reverse

also you can work with sysex in bindings
maybe you can exactly tell what you want to do?

cheers JĂĽrgen

Hi JĂĽrgen,

what I to try to achieve is controlling the voices that are used on a Yamaha Genos arranger via Cantabile.
When changing the panel voices on Genos via midi I have to work with midi-files containing a lot of sysex commands etc.

For the genos sounds I want to work with I have already redcorded the respective midi files containing all the commands needed to activate a specific voice and all of the effect parameters linked to that voice (I recorded the midi scripts via the multi-channel midi-recording-feature on the Genos).

The result is a bunch of midi-files each representing the setup for a specific voice that is activated on Genos as the “Upper 1” voice on midi channel 1.

So I can trigger a “Right 1 voice” - change in Cantabile by selecting the respective midi file in a media player object. Works pretty well so far.

But I also would like to set the “Right 2”, “Right 3” and “Left” voice on the Genos in the same way. To achieve this I will have to change each part of channel information in the midi file (in which channel 1 is referenced) to channel 2, 3 or 4 for the respective Genos Right 2/3/Left - voices.

Part of the work can be done by the midi channel routing/remapping featuere of Cantabile. But not for the sysex commands containing channel information.

I try to explain what I would like to do with the example from my first post:

001:2:0000 Sysex=F0 43 10 4C 08 00 60 40 F7 MultiPart : Ch 1 - AC2 Controler Number = 64
001:2:0000 Sysex=F0 43 10 4C 08 00 76 19 F7 MultiPart : Ch 1 - EQ Bass Frequency = 355 Hz
001:2:0000 Sysex=F0 43 10 4C 08 00 77 1C F7 MultiPart : Ch 1 - EQ Treble Frequency = 500 Hz
001:2:0000 Sysex=F0 43 10 4C 08 00 0C 3C F7 MultiPart : Ch 1 - Velocity Sense Depth = 60
001:2:0000 Sysex=F0 43 10 4C 08 00 0D 49 F7 MultiPart : Ch 1 - Velocity Sense Offset = 73
001:2:0000 Sysex=F0 43 10 4C 08 00 50 06 F7 MultiPart : Ch 1 - CAT LFO PMod Depth = 6
001:2:0000 Sysex=F0 43 10 4C 08 00 5B 05 F7 MultiPart : Ch 1 - AC1 LPF Control = -8850 cent

In this example I can identify a sysex that contains channel information that has to be changed
by its first bytes, those commands start (in this example) with “F0 43 10 4C 08”.

The next byte is the channel information which I would like to change.

So far it would be easy to do with a sysex decode / encode - combination. The problem is that the rest of the commands (the part after the channel information) is not static. Whatever it’s content may be it must be the same in the output as it was in the input. I do not see a way to resolve this by using the $(val), as the content of the two bytes after the channel byte can have different values from sysex to sysex within the midi script.

Example:

The input sysex is:
F0 43 10 4C 08 00 60 40 F7

The way I look at it is:
F0 43 10 4C 08 [channel byte] ?? ?? F7

The result has to be:
F0 43 10 4C 08 [changed channel byte] ?? ?? F7, where ?? ?? is the same content as before without knowing what the values of the bytes are in the sysex commands.

I hope it is understandable what I try to explain.

Franziska

Now I understand what you want to do…

I have tested it also
and alternatively with variables for the last two values $(cc) >> ANY and $(val)>> ANY

but here the midi Monitor is bringing wrong results…

I think Brad must have a look at this (could be a bug)
255 looks like DMX :joy::joy:

1 Like

Hi @Franziska

Quick question: are all the sys-ex messages the same length, or is the data after the “F0 43 10 4C 08 00” variable length?

Brad

I’ve just written a new midi filter Sysex Patcher.

Basically you give it two sys-ex patterns. One which decodes the incoming sysex and if it matches, uses the second pattern to generate a new sysex message. You use variables to pass arbitrary data from the decode pattern to the encode pattern. You can have have as many variables as you like (well up to 256) and you can name them what ever you like.

I’ve used $(a) and $(b) here to capture the two changing bytes.

image

I asked above if the data was fixed length. The above will work if it’s always two bytes of data you need to pass along. If you have a very limited range of data lengths you could hack it and setup a couple of filters. eg: say the data could be 2, 3 or 4 bytes in length you could do this:

image

Will this cover what you need? If so, let me know and I’ll include it in the next build.

4 Likes

@brad

You sir are are amazing

2 Likes

It’s magic…wow !!.. fantastic :mage:

so I think >>> F0 43 10 4C 08 01 $(ch) $(a) $(b) F7 (should work)

@brad Have you looked at the controller values…? (specific : 0 and ALL…the rest is working fine)

Second Question: Is it able to insert some global Variables that can used in filters and also the results in bindings? …maybe you can make this variables for global use ??

Thank you Sir

Build 3577 is up now and has this. I’ve also updated the docs with cleaned up version of what I wrote above.

If you’re just mapping ch 00 to ch 1 you don’t need $(ch). Just match on the 00 and replace it with 01.

No. MIDI filters run in the core audio engine and can’t call out to Cantabile’s main variable system because it might cause audio engine stalls. These sys-ex pattern variables are self contained to the single MIDI filter.

If you want to use global variables to generate sys-ex data you need to do it in a binding.

1 Like

WOW!

@Juergen: Thanks so much for trying out things and your feedback to my question.

@Brad: Brilliant, it’s exact the feature I need, and just in a twinkle of the eyes it is there. I have never ever experienced such a great support in any piece of software I used. I am speechless.

Regarding your question, Brad, if the tail part of the sysex string is always in a specific byte length - as far as the midi scripts go I had a look into, I would say yes, but that is just a guess. But making some generic sysex-patcher handling 2,3,4… bytes should be able to handle that, as suggested.

Franziska

3 Likes

@brad …best support ever!

…are there global variables?..I overlooked something?:thinking:

Ah, I think we’re crossing terms. By global variables I’m referring to these.

@brad …am I right when I think so it is possible to use the onscreen keyboard controller to save variables (as controller) and recall it after songchange?

maybe to…
save Volume parameters of channels
…then change my Keyboard Preset
than reset the Volume Values to the stored Values

should work?

Possible I guess… The on-screen keyboard variables are only reset when the app restarts, so they will be persisted across a song change

1 Like