Assign variable to a group..is this possible?

djenferno

2013-12-21 16:03:23

Looking for a little help here.

I'm trying set up a translator (or translators) that sends one of two MIDI messages, depending on the value of a Program Change sent from a MIDI keyboard.

I would like to include a small set of Program Change messages to trigger an action. For example:

Incoming Message: C0 oo

Rule: If oo = 11 or 12 or 13 or 14 Then exit rules and execute outgoing action

Outgoing action: another MIDI message


Is there a way to define a variable as ANY number within a set of numbers? This way, I only have to add each number to the set once? Or do I have to literally set up an IF THEN statement for each (11, 12, 13, and 14)? If so what's the syntax?

Thanks in advance

djenferno

2013-12-21 16:13:29

Also to be clear:

If the oo = anything other than 11, 12, 13, or 14, then I would like a different message sent. Thanks in advance for your help.

DvlsAdvct

2013-12-27 23:39:57

Hi djenferno

Sorry for the delay.

Unfortunately there are only a few ways to manage this. I find the easiest ways to manage a range is using greater than and less than statements. So your translator would look something like:

Code: Select all

Translator 1: Program Change
Incoming Message: C0 oo
Rules: if oo<11 then exit rules, skip outgoing action
if oo>14 then exit rules, skip outgoing action
Outgoing Message: <Insert MIDI Message Here>
It isn't the most elegant, but it should work, and be cleaner than each individual message as a rule. If you have a lot of these program changes they can be entered in as Goto commands, but you'd need to be careful about the order they are listed so everything triggers properly.

Does that make sense?
Jared

djenferno

2013-12-28 00:16:56

That's a great idea. I'm not going for elegance lol But before you posted your reply, I learned that I can't use the local variable "oo" with things like "7F". What do I do in that case?

So far the only thing i've come up with is to use a separate translator in my Always On section for oo=11, oo=12, oo=13, and oo=14. Each one has a ga=ga+1 entry. Then I use a separate translator for all other program changes that says:

if ga!=1 then exit rules, execute Outgoing Action

What I am doing is using this with Ableton live. I use program changes to control a Native Instruments Massive VST. I want to add Sylenth and other VST's, but I don't want to have to manually set the chain selector in the instrument rack. So if I send program change 13 on my midi keyboard, Bomes will select the Sylenth instrument in the chain automatically, then default to using Massive in all other instances.

DvlsAdvct

2013-12-28 00:22:59

oo SHOULD be able to be used with a message like 7F. I've run into some issues here and there where local variables are assigned strange values, but that shouldn't really be much of an issue. Replace oo with any other local variable like pp or qq and you should be fine.

You should be able to consolidate everything into a single, or two translators. Out of curiosity, how are you assigning commands when they are not 11-14? Is it just passing through?

djenferno

2013-12-28 00:38:14

I use the counter that increases whenever a program change is supposed to control a non-Massive VST.

Just tried again using IF THEN with 7F and it doesn't work. See attached file.
Attachments
Screen shot 2013-12-27 at 6.35.22 PM.png
Screen shot 2013-12-27 at 6.35.22 PM.png (413.96 KiB) Viewed 3719 times

DvlsAdvct

2013-12-28 01:14:24

Because in the rules window you have to use binary, not hex. So you'd say "if pp==0x7F" or "if pp==127"

127 is easier.

djenferno

2013-12-28 01:23:24

Awesome. Thanks! Although the way I set up my patches for live performance, I would be switching between Massive and other VSTs almost every other patch. For example 11 would be massive, 12 would be sylenth, and 13 would go back to Massive again. I need to set it up this way so that I can move easily within a performance between a predetermined set of patches.

Good info to know though. Thanks for your help. check out how I use Bomes with my Ableton/Serato rig here:

youtube.com/djenferno

thanks