Sysex manipulation

secmast

2012-05-23 14:42:55

I've got to modify a sysex coming from a software to a hardware that was not correctly setup.
The problem is that the sysex is 64 bytes long and therefore I had to create a translator for each sysex to make it 63 bytes long by removing the last byte before F7.

Now if Bome's had a passtrough of data via a variable I only need one line.

Let's say I need to modify one byte for each sysex:
F0 00 00 66 14 12 38 20 20 43 20 20 20 20 20 20 43 20 20 20 20 20 20 43 20 20 F7
F0 00 00 66 14 12 38 55 56 43 27 32 20 25 24 20 43 20 26 50 20 20 20 43 20 20 F7
Actually to manipulate those two sysex I needs two translators

A way to select a part of the sysex that will not taken into account to trigger the rule.
F0 00 00 66 14 12 38 (55 56 43 27 32 20 25 24 20 43 20 26 50 20 20 20 43 20) 20 F7

These byte are the one I just want to pass as it is but I want to manipulate any other bytes.
This will reduce de numbers of translator.

florian

2012-05-29 10:00:25

Hi,

indeed, MT does not handle variable length messages well.
My idea how to implement his is this:

Incoming: MIDI F0 00 00 66 14 12 38 [*1] 20 F7
Outgoing: MIDI F0 10 10 76 24 [*1] 20 F7

So [*1] stands for a variable number of bytes. You can then also use multiple var length blocks, [*2] etc.

Would that work?

Thanks,
Florian

secmast

2012-05-29 17:51:54

Yes that's perfect.
Therefore you can have a sysex entering and manipulate it without having to retype the entire sysex from in to out (with correction)
For exemple I have a problem with a soft, All sysex are too long of one bytes, then i just have to take the first bytes F0 00 00 30 70 (*10) 20 F7 as input and for output
F0 00 00 30 70 (*10) F7.
That makes only on line for ALL of them.

florian

2012-05-29 22:23:38

ah I see. If the length of the sys ex message is fixed (e.g. to 64 bytes), then you can use variables to catch all such messages:

So if you want to do this:

Code: Select all

INPUT: F0 00 00 66 14 12 38 [10 bytes] 20 F7
OUTPUT: F0 00 00 66 14 12 38 [10 bytes] F7
You can write in version 1.7.2:

Code: Select all

INPUT:  F0 00 00 66 14 12 38 ga gb gc gd ge gf gg gh gi gj 20 F7
OUTPUT: F0 00 00 66 14 12 38 ga gb gc gd ge gf gg gh gi gj F7
Now for a sys ex message of 64 bytes, just use more variables. You can use ga...gz, ha...gz, ia...iz, etc. I guess you need 55 variables, that makes it ga...ia.

Cheers,
Florian

secmast

2012-05-30 16:30:14

Such a big work to have it done.
But that was an example, I can imagine some other where having a wildcard (E.G. *10) would be perfect anyway.