IF statement with more than one parameter

Discuss Lemur and share techniques.
Post Reply
Kabuki
Newbie
Posts:3
Joined:20 Jun 2016 16:28
IF statement with more than one parameter

Post by Kabuki » 23 Jun 2016 15:55

Hello Lemur Forum!

I've been working on a softsynth controller and would like to select the LFO speed using two drop-down menus:

Denominator (1/2, 1/4)
Type (Straight, Dotted)

Based on these combinations I'd then send the respective value to the LFO speed knob on the softsynth.

However, I can't seem to find a way to combine two conditions in one IF statement, such as:

if denominator = 1 and type = 0 then set lfospeed = 0.138

Does anybody know the correct syntax for this?
Thanks for your help!

K.

CSharpDude
Newbie
Posts:4
Joined:17 Jun 2016 19:26

Re: IF statement with more than one parameter

Post by CSharpDude » 24 Jun 2016 22:53

I think you want to use logical operators (page 145 in the manual):

if(denominator ==1 && type ==0){
// Do something really cool!
}

&& is AND
|| is OR
! is NOT

Hope it helps!

Dave

Kabuki
Newbie
Posts:3
Joined:20 Jun 2016 16:28

Re: IF statement with more than one parameter

Post by Kabuki » 25 Jun 2016 19:33

Hello Dave!

Thanks so much for your explanation.
I used the pointed brackets incorrectly, which is why my script didn't work.
You're a boss!

K.

Post Reply