Should this conditional work?

gwbcn

2010-04-14 01:36:48

[x] Translator 0.0: AssignVariable
Incoming: MIDI B0 50 7F
Rules: oo=1
Outgoing: (none)

[x] Translator 0.1: CheckThenLaunch
Incoming: MIDI B0 50 00
Rules: if oo==0 then exit rules, execute Outgoing Action
Outgoing: Keystroke: Y


The second translator always executes regardless of the variable oo's assignment.
Obviously I'm missing something here - any advice is appreciated.

Attigo

2010-04-14 19:10:24

Hi gwbcn,

'oo' is 'Local Variable', meaning it only operates within 1 Translator. You need to use a 'Global Variable', such as 'ga' to hold a value throughout one or more Translators/Presets...

Scott

gwbcn

2010-04-15 11:44:53

'Turns out that changing to a global still doesn't work unless you do a little more "hand holding" with the interpreter.
In addition to telling it what to do, you have to tell it what not to do as well. Thanks for pointing me in the right direction.

[x] Translator 0: AssignVariable
Incoming: MIDI B0 50 7F
Rules: ga=1
Outgoing: (none)

[x] Translator 1: PedalUpLaunch
Incoming: MIDI B0 50 00
Rules:
if ga!=0 then exit rules, skip Outgoing Action
if ga==0 then exit rules, execute Outgoing Action
Outgoing: Keystroke: Y

Attigo

2010-04-15 12:06:47

Actually, you only need your first rule...

Code: Select all

[x] Translator 0: AssignVariable
Incoming: MIDI B0 50 7F
Rules: ga=1 
Outgoing: (none)

[x] Translator 1: PedalUpLaunch
Incoming: MIDI B0 50 00
Rules:
if ga!=0 then exit rules, skip Outgoing Action
Outgoing: Keystroke: Y
Scott

gwbcn

2010-04-15 15:49:53

OK, I think I understand what the default behaviour is now.
-thanks again-

webby

2010-04-22 00:52:32

This is very necessary for us because some place need to work as different type of work .that time ready for work.

Thanks agan-