Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Modular Select CHOP

Still a little green? Ask your beginner's questions here

Modular Select CHOP

Postby jordpont » Thu Mar 07, 2019 10:45 am

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:
Code: Select all
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.
Attachments
modular_select_chop.toe
(3.93 KiB) Downloaded 16 times
jordpont
 
Posts: 4
Joined: Mon Sep 21, 2015 9:42 am

Re: Modular Select CHOP

Postby CorbinWhite » Thu Mar 07, 2019 7:18 pm

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.
CorbinWhite
 
Posts: 97
Joined: Sun Aug 16, 2015 2:49 pm

Re: Modular Select CHOP

Postby jordpont » Fri Mar 15, 2019 5:08 am

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.
Attachments
Captura de pantalla 2019-03-15 a las 9.52.58.png
Selecting the channel of the chop with a python script I don't get the value in the chop, i get it on the parameters but not in the chop
Captura de pantalla 2019-03-15 a las 9.52.58.png (55.91 KiB) Viewed 407 times
Captura de pantalla 2019-03-15 a las 9.45.21.png
Selecting the channel of the chop manual I get the value in the chop
Captura de pantalla 2019-03-15 a las 9.45.21.png (94.56 KiB) Viewed 407 times
jordpont
 
Posts: 4
Joined: Mon Sep 21, 2015 9:42 am

Re: Modular Select CHOP

Postby CorbinWhite » Fri Mar 15, 2019 3:01 pm

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.
CorbinWhite
 
Posts: 97
Joined: Sun Aug 16, 2015 2:49 pm

Re: Modular Select CHOP

Postby jordpont » Fri Mar 15, 2019 5:02 pm

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.
jordpont
 
Posts: 4
Joined: Mon Sep 21, 2015 9:42 am

Re: Modular Select CHOP

Postby CorbinWhite » Fri Mar 15, 2019 6:38 pm

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.
CorbinWhite
 
Posts: 97
Joined: Sun Aug 16, 2015 2:49 pm

Re: Modular Select CHOP

Postby guarana » Sat Mar 16, 2019 1:04 pm

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
Attachments
Screen Shot 2019-03-16 at 1.00.48 PM.png
Screen Shot 2019-03-16 at 1.00.48 PM.png (166.62 KiB) Viewed 345 times
// Philippe Provencher
guarana
 
Posts: 77
Joined: Sun Apr 27, 2014 10:13 pm

Re: Modular Select CHOP

Postby CorbinWhite » Sat Mar 16, 2019 3:17 pm

me.inputs[0] returns the object, anyway, so getting its name and calling it via the op() method is just extra work, no?
CorbinWhite
 
Posts: 97
Joined: Sun Aug 16, 2015 2:49 pm

Re: Modular Select CHOP

Postby guarana » Sun Mar 17, 2019 1:35 pm

thats right me.inputs[0][me.digits].name works just as well
Thanks for pointing that out!
// Philippe Provencher
guarana
 
Posts: 77
Joined: Sun Apr 27, 2014 10:13 pm

Re: Modular Select CHOP

Postby jordpont » Fri Mar 22, 2019 10:35 am

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

Really appreciate, thanks again!
jordpont
 
Posts: 4
Joined: Mon Sep 21, 2015 9:42 am


Return to Beginners

Who is online

Users browsing this forum: No registered users and 17 guests