Global vars in Incoming Midi trigger definition

Mikael

2016-12-30 14:39:02

I specify some general channel and controller numbers as global vars.

Now I want to use a global var in an Incoming MIDI trigger.

I do not want the value of the specified var to be set to the incoming MIDI value, but I want the var to define how the trigger has to look like.

For instance:
global var:
g1 = 0x12
trigger MIDI expression:
9D g1 7F

I want the translator to be triggered only if the received MIDI is "9D 12 7F".

Right now the expression acts as if g1 is a local var and the translator is triggered by any value in place of "g1". This makes perfect sense if a local var is used. A global var should act like a value in this place.

Is there a way to achieve this right now?

regards!
Mikael

sjcaldwell

2016-12-30 16:49:44

Trigger on any incoming value and set it to pp
In rules
if pp!=g1 then exit rules and skip outgoing action.

Mikael

2016-12-30 17:16:38

Problem with this approach is that if "swallow" is set, the translator will swallow all matching messages. this is precisely what I need to avoid.

If the translator is only triggered for wanted values in the first place, swallow only occurs when it is wanted.

Regards, Mikael

sjcaldwell

2016-12-30 17:46:34

You will need another translator to catch and process any other messages.

In order to avoid duplicate processing, you need to have a rule the skips the other translator if pp==g1

if pp==g1 then exit rules and skip outgoing action

Between the two translators you will get desired results.

Triggers have to occur first and the rules to hone in on what you want.

Mikael

2016-12-30 18:09:09

Got it! Thank you! why didn't I figure this myself :D

sjcaldwell

2016-12-30 18:41:29

Mikael wrote:Got it! Thank you! why didn't I figure this myself :D
That is what we are here for! To learn from eachother.