I’m wondering what the team thinks of adding a new CHOP that takes in two inputs, and for each sample pair applies a selected comparison operation, such as >, <, =>, =<, ==, !=, and outputs a 1 where true, and 0 where false.
It could also use two channels from a single chop perhaps?
Some potential parameters it could have:
Operation (select which of the six comparisons)
Input order: normal or reverse
Op A and Op B (to use CHOPs elsewhere in the file, as opposed to wires)
Sample Range (to only look at some of the samples, if there’s more than one)
Use first sample only
Scope or some method of selecting just certain channels in a multi channel CHOP
I know there are many ways to do this already using scripting (see patchy’s file in above thread), but this RFE is specifically for a dedicated new CHOP. It could be called an Op CHOP.
Yup, but this RFE is to do it without scripts. That’s the point of having so many CHOPs already, a lot of them allow you to program visually with minimal/zero python.
If you take your 2 CHOPs, subtract them to get their difference. Then use the Logic CHOP’s Convert Input menu and Channel Pre OP’s Invert or Off to get all those comparison operations… does that get you want you are looking for?
If it were to be collapsed further as a built-in option, I see it as a few more menu entries on the Function CHOP, as that already has a few operators that take two inputs.
Yes insofar that it’s more visual, but I’m still hopeful for a single chop solution, as I find that needing to pop in such an operator slows my work down due to having to drop multiple chops or use scripting/expressions. Hence the RFE
@rob adding it to the Function CHOP could be nice, as would a new CHOP.
We’re exploring some options right now.
The first change was to extend the Logic CHOP convert to include all 6 relational operators: >, >=, ==, != etc.
So now its down to 2 CHOPs: Math + Logic.
Figuring out how to simplify it further in a consistent way now.
Cheers
I bumped into this today, glad there is an RFE for it!
Every programming language has these basic operators down to typing 1 or 2 characters and outputting a bool. It’s so basic that it’s a miracle there was never a dedicated CHOP for it, really.
I would advice a dedicated ‘compare CHOP’ that works like the logic chop but for comparative operations instead of logical operations. Having it in a separate CHOP would prevent having to change too many parameters to turn the logic chop into a comparing function each time after adding a logic chop that has its defaults set for logic functions.