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.
IF statement with more than one parameter
-
- Newbie
- Posts: 4
- Joined: 17 Jun 2016 19:26
Re: IF statement with more than one parameter
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
if(denominator ==1 && type ==0){
// Do something really cool!
}
&& is AND
|| is OR
! is NOT
Hope it helps!
Dave
Re: IF statement with more than one parameter
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.
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.