How to ignore part of incoming sysex for matching purposes?

Hi, this is a very basic question, but I’m stuck on it.

Say the following string is incoming raw data,

24 30 1 54 53 57 45 4C pp 45

and you want the translator to only match on the 24 30 1 part, the rest of the string you want it to ignore for matching purposes.

How would this be achieved?

Thanks!

Hi, first of all your example would not work correctly as it is an incomplete MIDI message. A SysEX pattern would start with F0 and end with F7. The first byte of any incoming MIDI message should always have the 8th bit set.

Now lets say you use:

F0 24 30 01 54 53 57 45 4C pp 45 F7

And you only want to process the value of if pp if the value of the third and forth byte is 24 and 30 hex respectively. The above pattern would do this.

You could then use pp as a variable to use and change for your given outgoing message.

If you want the 2nd byte to be anything and only process it if if is greater than 0x24 and less than 0x29 you would have something like the below:

Incoming : F0 oo 30 01 54 53 57 45 4C pp 45 F7

Rules:
if oo<0x24 then exit rules, skip outgoing message
if oo>0x29 then exit rules, skip outgoing message

Outgoing: Whatever MIDI message you want which could also include variable derived from local variables oo or pp.

Note, the message length needs to be exact for the incoming message for the pattern to match.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

OK, thanks for your help Steve.

I think my reply in this thread covers what I still need to clarify:

Here is an example of converting an NRPN message to SysEX using variables. I use Raw MIDI as input instead of NRPN so that I can assign the input as a variable.

NRPN-to-SysEX-example-2022-07-25.bmtp (776 Bytes)

In this case , oo is the MSB and pp is the LSB and qq is the value of the NRPN.

I’m not using any rules to change the variables in this case, I’m just passing them through in the output pattern. The actual SysEX may not do anything as this is just an example for illustration purposes.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Perhaps that explains a problem I was having earlier trying to use the NRPN input with a variable, in the end I resorted to raw midi and it started working.

Thanks for the NRPN to SysEx example, its all falling into place!

Yes, I’ve also requested that NRPN input allows use of variables for a future release.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz