Having A Problem With Conditionals

0
0

In Bome MIDI Translator I’m trying to program a conditional, e.g ” if l1==2 then exit rules, exit rules execute outgoing action.”

My problem is when “l1 is not equal to 2” it is still executing the outgoing actions.

What am I doing wrong.

PS in the choices for conditionals, what does “!=” do?

Thanks in advance for the help…

Marked as spam
Posted by (Q&A Forum: 7, Answers: 35)
January 9, 2019 1:00 am
8 views
0
Private answer

Hi Steve,

Thanks for using the forum.

Any translator that does not have a conditional to skip outgoing actions will execute it’s outgoing action. So if you have a  conditional that says

if l1==2 then exit rules, execute outgoing action

with no other rules, the action will always be triggered given the incoming trigger is true.

 

In order to avoid this, you can either add another rule as follows

if l1==2 then exit rules, execute outgoing action

exit rules, skip outgoing action

Or you can simply change the initial rule to

if l1!=2 then exit rules, skip outgoing action

In the above case,  i1!=2 means i1 is not equal to 2. So if i1 is 2 the default outgoing action will execute and if not 2 it will skip the outgoing action

!=  means not equal to
== means equal to
>= means greater than or equal to
<= means less than or equal to

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Marked as spam
Posted by (Q&A Forum: 35, Answers: 2542)
January 9, 2019 1:18 am

Thank you Steve. It works perfectly. I’m using the “if l1!=2 then exit rules, skip outgoing action” conditional.
Thanks again…s

( at January 9, 2019 1:26 am)

You’re welcome.
Typically I only use if qq==2 then exit rules, execute outgoing action

if I want to do something else in the translator if the condition is note met

Example

Incoming : Note-on MIDI CH 1 note 60 velocity any velocity set to qq

if qq==2 exit rules, execute outgoing action
qq=qq*2

Outgoing : Note on CH1 Note 60 velocity qq

In the above example if velocity is 2 then it will output same velocity as input. Oherwise it will output 2 x whatever the input velocity was.

( at January 9, 2019 1:37 am)