Boolean logic: and, or

leaozinho's icon

I have a part of my patch that should only run for numbers that aren't 0 or 12, so I need an object that is something like: != 0 AND !=12, or something like [== 0 OR == 12]. I've been doing it with two separate [!=] objects but the max scheduling makes it such that it doesn't really work the way I need it to. Is there a way to do this in one object? I know that the 'if' object might work but I'm wondering if there's a simpler solution.

Nate S's icon

Depending on what you wanted the output you could be, you might want to use a [sel 0 12] or [route 0 12], with the output coming from the third outlet - that is, for anything that is not either of the two aforementioned numbers.

Is this what you're looking for?

Roman Thilenius's icon

[if ($i1!=0) && ($i1!=12) then $i1]

... but [route 0 12] is computed much faster.

leaozinho's icon

Right, route is better. Thank you!