Forums > MaxMSP

### Comparison Operators

Mar 02 2008 | 1:06 pm

Hi,

Maybe a simple question, but how would you create a comparison operator that could check if the number in a number box (in its left inlet)is >= 120 and < =130.

Also, if the number in the numberbox meets the conditions how do you send that exact value as an output instead of just a 1 or 0 for true or false?

Thanks

Mar 02 2008 | 1:23 pm

On 2 mars 08, at 14:06, Adam wrote:

> Maybe a simple question, but how would you create a comparison
> operator that could check if the number in a number box (in its left
> inlet)is >= 120 and < =130.
>
> Also, if the number in the numberbox meets the conditions how do you
> send that exact value as an output instead of just a 1 or 0 for true
> or false?

[>=] and < =] do comparaisons. [&&] is a logical and which is true when
both input are true. You might have a look to the tutorials which
cover those aspect pretty well.

Cheers,
ej

Mar 02 2008 | 3:20 pm

take a look at [split]

Mar 02 2008 | 6:40 pm

> Maybe a simple question, but how would you create a comparison
> operator that could check if the number in a number box (in its left
> inlet)is >= 120 and < =130.
>
> Also, if the number in the numberbox meets the conditions how do you
> send that exact value as an output instead of just a 1 or 0 for true
> or false?

[split 120 130]

Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

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

Forums > MaxMSP