Custom parameter for camera selection with MIDI

Hello!!

I need to control the index of a TOP switch. I want to do it from the parameters of its container so I can link the video selection buttons to a MIDI controller. I know how to control the index from the keyboard and from a custom parameter like a Menu, and also from a button using a count CHOP — but I want to be able to trigger each of the cameras indepently from the MIDI… i´m stucked… Any ideas?

Thank you all very much!

Hi @Tapani_kurokawa,

Could you share how far you got?

You can use a channel coming from the Midi In CHOP, rearrange it with a Math CHOP to fit your Switch inputs, append a Null CHOP and export the channel from there onto the custom parameter.
Alternatively you could also use a Midi In DAT and use its attached Callback DAT to set the custom parameter with some python scripting.

a good resource for understanding the underlying principles is our curriculum at

learn.derivative.ca

with short videos explaining the fundamentals behind TouchDesigner.

cheers
Markus

Hi @snaut,

First of all tahnks for your time. Yes, I checked the math documentation in the learn platform before I post my question here. As I see it I have two separate problems here. The first one is get a chanel in one chop with the values 0, 1, 2, 3 and 4. I can´t set up the math chop to combine the separate chanels into one with these values.

The second problem is that I can´t find the type of custom parametrer that can allow me to trigger de values independently. Now I´m using a menu, but it´s not too practical…

In this screenshot you can see aswell a momentary parameter that is binded to a count chop conected to a switch as an alternative setup, but i isn´t too usefull neither.

I hope all this make sense…

Thanks!!!

Hi @Tapani_kurokawa,

have a look at the Fan CHOP, it can take multiple channels as an input and convert them via the “Fan In” setting of the Operation parameter to the index of the first channel that has a value >0

Now I see that multiple of your channels have values >0 so a question would be what the result should be when multiple are on?
Theoretically you could use a Logic CHOP and set the Channel Pre OP parameter to “Radio Button” to make sure only a single channel is ever “on”.

If you need more examples of how things might work, make sure to also check out the OP Snippets for each operator.

Once you have a single value, I think either a Menu parameter or a Integer parameter should be good for your purpose.

Hope this helps
Markus

Hi @snaut ,

Fan Chop worked fine, thank you so much.

For custom parametres I finally used and integer so I can visulize the number of source or the FX layer.

Thank you for the help