Modular Select CHOP

Hi Everyone,

I’ve been working in some projects with touch designer, and little by little i’m trying to improve my technique on the software.
I’m getting OSC messages from another software to touch designer.
The fact is that i have different inputs from different OSC IN Chops. Every OSC IN Chop has 12 channels. Then i take all the data from every OSC chop and i process it the same way.
Select every channel and adding some more chops to have a results and send out artnet information.

The problem is that every OSC IN gets data with different names, like FIXTURE_01 and receive 12 channels.
So with the select chop i select the channel FIXTURE_011(to select the first channel), and so with 12 remaining.

Everytime i create a new OSC IN with a different name like FIXTURE_08 i need to relink all the selects from every OSC IN and sometimes i have like 40 fixtures.

So i’m trying to make it modular an applying python coding to make it work.
Like this:

me.parent().name+"1"

Where i’m trying to get the FIXTURE_011(FIXTURE01+channel 1)
And it seems ok, i get the value with the python script but the select chop remains black like it is not working.
I add the toe where you can see what’s happening.
Hope anyone can help me.
Thanks in advance and sorry for that long text.
modular_select_chop.toe (3.93 KB)

The reference you currently have in the channel names parameter is going to return the value of the reference. op(‘oscin1’)[0].name will return the name; you need to use a name that is in the CHOP you’re pulling from. You also need to call the OSC in operator in the CHOP parameter of the select CHOP, otherwise it doesn’t know what CHOP to pull from.

I’m having a little trouble following what the issue is, creating a new operator shouldn’t unlink the ones that exist from their selects, but I hope that helps you get a little further.

Hi Corbin,

Thank you very much for your response.
What I want is to do modular the input name of the Select Chop, because I need to have multiples containers with different OSC in’s and every time I create a new want I have to go to each select chop and relink the input of each chop, this script that returns the name seems to work, but the value of the input seems that is not getting in the select chop.
I attach two photos, one that gets from the osc chop the value -3,142.
And another one that is modular with the python script that I it gets the value in the parameters but don’t get any value on the chop and it remains black.

Hope i explain it.

Thanks in advance for your help.


I think the problem is that you’re trying to grab a channel object through a reference, but unfortunately you can’t do that with a select CHOP, you have to either plug the CHOP into the select’s input or drop it into the select’s CHOP parameter. You can think of it this way: a select can’t go and get a channel from another CHOP, you have to feed it a list of channels to select from, and you do that by specifying the CHOP(s) whose channels you’re selecting from.

So is there any way to make it variable?
Because every time I create a new container with a different “OSC in” I get the name of the OSC value but the treatment inside of the container is the same. Just that the name of the OSC changes and then I need to relink and specify every CHOP channel.
I have 11 different ones, and then I have maybe 50 different “OSC in” so I need to relink 11x50 times the select channels.
I don’t know if you get the problem. But I don’t want to go and relink every time I have a new “OSC in”.

Sorry for my ignorance, and thank you very much.

It sounds like you want to make a module that can take an OSCin CHOP and split all of its channels into individual CHOPs. Is this correct?

The internet where I am now is awful, so I can’t upload an example, but if that’s what you want try this:

Right-click on the output of your OSCin and select a BaseCOMP, this will create a base with an inCHOP already connected. Inside the Base, attach a select to the inCHOP, and attach an outCHOP to that. Then use this expression in the channel names parameter of the select.

me.inputs[0][me.digits-1].name

Then copy and paste the select/outs 12 times, or however many channels of OSC you have. You should be able to plug any OSCin CHOP into this base and have it split the channels, doesn’t matter what their names are. With custom parameters and a bit more scripting, you could also have this module handle an OSCin CHOP with a variable number of channels.

I’m not sure i understand why you would do it that way, but you actually can dynamically select the channels using an expression.

say you have a oscin1, you could connect it to a bunch of selectin1_0, selectin1_1…and so on, each having this as the channel name expression: op(me.inputs[0].name)[me.digits].name

they your oscin2 would be used with selectin2_0, selectin2_1 and so on.

breakdown of the expression:
op(me.inputs[0].name) Check for the op object with the name connected in the select’s input
[me.digits] uses the selects last number in it’s name, and use that as the channel index it’s looking for
and .name means the name of that channel’s index

me.inputs[0] returns the object, anyway, so getting its name and calling it via the op() method is just extra work, no?

thats right me.inputs[0][me.digits].name works just as well
Thanks for pointing that out!

Ei Thank you very much you booth, now it works perfectly.

Really appreciate, thanks again!