Is there a CHOP that evaluates to 1 if two input CHOPs are compared somehow, such as:
A == B
A > or < B
A <= or >= B
A != B
I know how to do this with python, but there are some logic steps I’d like to build more visually using a chop to do this step. My first guess would have been the Logic CHOP, but I don’t see how to do this kind of comparing with it.
Have you been using the expression chop previously for your python like this? me.inputVal will give you the first chop’s first channel and me.inputs[1][0] will get the second chop’s first channel.
Remember - When in doubt, there’s always the Script CHOP! Here’s a .tox with a Script CHOP, with an “Operation” par in the “Custom” page. You can choose the comparison you want and it will output the result. ATM it only handles single samples, but you could expand the code to do these operations with channels
For another approach, take your two samples, subtract them in a Math CHOP, then apply a Function CHOP set to “sign”
This will give -1 for less, 0 for equal, +1 for more.
You can then follow up with a Logic CHOP to select the ranges you want. (0 to 1) for >=