Hi, I'm pretty new to PD, but I find it very interesting (and addictive)! I was wondering if it is possible to use a relational operator (such as the == object) to compare one value to MULTIPLE values on the other side. For example, can I use one object box to output a 1 if A = B or C or D or E, etc.?
Thanks very much for the help!
-
Relational operators question!
-
In short, no, not within a single unit. It's a binary operator, in the sense that it combines only two operands. You cant say [a == b == c] meaningfully. You have to split your logic net into simple ops like ((a == &&( b == c))
in Pd
a b c
| / \ |
[==] [==].
| |
[ && ](remember that control rate units only eval when the leftmost input is updated)
Use the Source.
-
Okay, thanks for the help!