Hey I was wondering if it is possible to select several channels, using their channel index instead of their name?
Say for example I have a noise CHOP outputting nine channels named chan_[asdfghjkl]
I would like to connect something like a Select CHOP, and be able to select only the first channel (chan_a), or select the first and last (chan_a and chan_l), or a group of channels, regardless of their name, just by looking at their index.
I was able to select one channel using this expression in the channel name parameter of a Select CHOP: me.inputs[0][int(op('null_with_index')[0])].name
where ‘null_with index’ is a null CHOP, connected to a constant CHOP with one value.
I was wondering if it is possible to select several channels? say index 0 to 3, index 4 to 9, or index 2,4,6,8 for example. In some way similarly to the Select DAT.
I would like to keep it in CHOP land, without going via DATs as I will be dealing with a lot of channels with changing values.
If you aren’t married to naming your channels chan[asdfjkl], you can do this really easily by giving them number suffixes instead that reflect their index. Then you can use an expression like chan_[2-5] to select a range of channels. Or chan_[2,4,6,8] to select a group of individual channels.
hey Chris @riebschlager,
thank you so much for the suggestion, but for the type of application I need this time around, selecting using pattern matching unfortunately it’s not going to work.
Evan Pierre @evanpierre, the Delete CHOP indeed has the feature that I was looking for, thank you for pointing me in that direction.
The only problem is that the Delete Chop does the exact opposite of what I am trying to achieve!
However with a little workaround it just worked perfectly for what I needed to do. Thank you for the suggestion !!!