Forums > MaxMSP

help with [if] function

May 4, 2012 | 11:41 pm

I have two inputs that are both ever changing to either 1 or 0. I would like to create an [if] message whereby if both inlets equal zero then a 1 is outputted. How would I write an if message to state that: if inlet 1 and 2 both equal 0 at the same time then output 1?

May 5, 2012 | 1:27 am

if $i1==0 && $i2== 0 then 1


if ($i1+$i2==0) then 1

brackets only for readability.

combining multiple toggles can also be done quite nicely using binary operator.

and if you only want to stack conditions (if you only need to find "all true"), multiplication is your friend.


Viewing 2 posts - 1 through 2 (of 2 total)

Forums > MaxMSP