This forum is read-only. Please post new topics in our Q&A forum.

Global vars in Incoming Midi trigger definition

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
Mikael
User
Posts: 5
Joined: Sun Nov 13, 2016 6:28 pm

Global vars in Incoming Midi trigger definition

Post by Mikael » Fri Dec 30, 2016 2:39 pm

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

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Global vars in Incoming Midi trigger definition

Post by sjcaldwell » Fri Dec 30, 2016 4:49 pm

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

Mikael
User
Posts: 5
Joined: Sun Nov 13, 2016 6:28 pm

Re: Global vars in Incoming Midi trigger definition

Post by Mikael » Fri Dec 30, 2016 5:16 pm

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

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Global vars in Incoming Midi trigger definition

Post by sjcaldwell » Fri Dec 30, 2016 5:46 pm

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
User
Posts: 5
Joined: Sun Nov 13, 2016 6:28 pm

Re: Global vars in Incoming Midi trigger definition

Post by Mikael » Fri Dec 30, 2016 6:09 pm

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

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Global vars in Incoming Midi trigger definition

Post by sjcaldwell » Fri Dec 30, 2016 6:41 pm

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.

Post Reply