wasnt sure about the title.
basically i have 2 CHOP operators.
First operator holds one value and the other holds all possible values.
I would like to set the corresponding channel value of the second operator to one.
very poor description i think, but here is a screenshot. So in this case channel 41 should be one.
its basically a comparison. if any of the channel names of the 2nd operator match the value of the first then those channel values should be one.
it works, but seems complicated. its not very straightforward to do these sort of comparisons in TD.
match_value.1.toe (4.1 KB)
Hi @papsphilip,
wondering how big the value might get? For a smaller value - let’s say maybe to 100
you could make use of the Fan CHOP in combination with a Replace CHOP:
Append a Fan CHOP to your single value CHOP and set the Channel Names
parameter to something like chan[0-100]
now the channel with the index of the input value will be on.
For the values coming from the table convert to a DAT as you did and append a rename to prepend a “chan” value - basically you are trying to come up with the same “namespace” for both CHOP branches. Now use a replace which will replace any channel from the first input with the matching channels in the second input.
Low number I mentioned as with large amount of channels - like thousands - the Fan CHOP can become a bit sluggish.
cheers
Markus
much more elegant solution, thanks @snaut!
my values are going to be up to 110 or something, so Fan CHOP will be alright