I want to make a simple logic involving the comparison of 2 int chops. When they are equal, output High. When they are not, output 0.

I searched everywhere and tried the Logic block and all sorts of other blocks. I’m probably tired

I want to make a simple logic involving the comparison of 2 int chops. When they are equal, output High. When they are not, output 0.

I searched everywhere and tried the Logic block and all sorts of other blocks. I’m probably tired

Send both CHOPs to a Math CHOP where you Combine CHOPs with a Subtract, then pass it a Logic CHOP where Convert Input is set to Off When Zero, and Channel Pre-OP to Invert.

Now that’s assuming both operators have the same number of samples. To check that, it’s the numSamples member in python, or you can count the number of samples in a CHOP by setting all samples to 1 in a Math CHOP (Out Range is 1 and 1) and send it to an Analyze CHOP set to Sum all the samples.

The Logic CHOP is really about Boolean values, and actually converts inputs into 0 and 1 vals.

To get the result you’re talking about you might want an expression CHOP instead.

Something like:

`me.inputs[0][0][0] if me.inputs[0][0][0] == me.inputs[1][0][0] else 0`

Return the first sample of the first channel in the first input if the two inputs match, otherwise it will return 0.

Ah yes, thank you both for the answers, both work great!