Converting MIDI Note and Velocity to SYSEX

Hello! First time posting on the forum! I’m very excited to have found Bome MIDI Translator as it appears to be able to accomplish what I need. I’ve been able to successfully make a rule that will take take Note 0 (C-1) at Velocity 1, and make that output a SYSEX Message that outputs F0 7F 01 02 01 01 31 00 31 F7.

As I understand it, the 31’s referenced in the SYSEX message mean that it will (in the software I’m sending this message to) launch Cue 1 in Cuelist 1 and that I can access cuelists and cues by changing that number (For example: Cue 2 would be 32 and cue 15 would be 31 35)

My question is, how can I use the Note value and Velocity value to convert 15 to 31 35? Is there a way I can write that into a rule that will work whether it’s a single digit or a 2 or 3 digit number?

Normally, the rules would look something like this:

Incoming action:
Note On
Note: 0 (C-1)
Velocity: Any Velocity
Set variable to velocity: oo

Rules:

if oo=15 then pp=31

Outgoing Action
Raw MIDI / System Exclusive
F0 7F 01 02 01 01 31 00 pp F7

You could also use both Note value and Velocity in the rules, It would look almost the same.
You can put as many variables as you want in the outgoing message:
F0 7F qq rr ss tt uu pp F7
Something like this works just fine.

Can you elaborate a bit on that, I’m sure it’s possible but I need a bit more information.

Hi,

In order to work with differing length of outgoing SysEX messages, you will have to construct a pattern in a separate translator for each length you want. Then using the input, fire only one of the output translators.

Steve Caldwell
Bome Customer Care


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

I believe SteveC answered this below, but I’m having trouble conceptualizing it.
To use your example,

if oo=1 then pp=31

That should work perfectly fine, but let’s say I have

if oo=10 then pp=31 30

would that work?

Also, would I have to create a rule for each Velocity value? I feel like there’s got to be an easier way.

Hi, you could use rules to do the math you want.

Again you would need different patterns for then number of digits unless you don’t mind leading zeros

So say you want a two digit number 00-99

// calculate 10s since MT Pro does integer math there is no decimal
rr=oo/10
// convert to the tens digit value
rr=rr+0x30

// calculate 1’s using MOD operator
ss=oo%10
// convert to 1’s digit number
ss=ss+0x30

Now the output for would look like this.

F0 7F 01 02 01 01 31 rr ss F7

Steve Caldwell
Bome Customer Care


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

Oh and if you don’t want to go out of range.

if oo>99 then exit rules, skip outgoing action

Okay cool. I’m not sure if the software I’m using will tolerate leading zeros, but I’ll give that a shot.
Thank you!

If it doesn’t, then you just set up 2 patterns for SysEX output and the value is less than 10 you use the 1 digit pattern and if it is greater than 10 you use the 2 digit pattern.

Okay, the leading zeros were no problem. The conversion works perfectly! Thank you very much for your help! I’ll be purchasing the app and putting it to full time use! :slight_smile:

1 Like