Recma
December 27, 2024, 1:20pm
1
Hello everyone !
I was wondering if there is a way to easily place any CHOPs or TOPs (like an audio file in) by pressing a button on touchportal ?
Heard that Websocket and OSC DATs can do thet, but I have no idea on how to do that
Thanks in advance !
Cheers
Recma
December 27, 2024, 3:03pm
2
I just wattched this tutorial, and used a Streamdeck to give it a try : https://www.youtube.com/watch?v=UrZgDGxFZsQ
Worked like a charm
The thing is I have no idea what code to put to create a node in the project !
snaut
December 31, 2024, 4:48pm
3
Hi @Recma ,
not sure how familiar you are with Python Scripting in TouchDesigner, but a first step might be to check our curriculum at:
If all of this is clear, a new operator can be created via the COMP Class’ .create
method:
On any component, you can say:
n = op('/project1')
w = n.create(boxSOP, 'box12')
w
now will hold a reference to your new operator inside “/project1”
Hope this helps
cheers
Markus
Recma
January 25, 2025, 10:55am
4
Thank you Markus
I just tried to make a test with a constant chop linked to a chopexec, including this code :
def onValueChange(channel, sampleIndex, val, prev):
n = op('/project1')
w = n.create(boxSOP, 'box12')
return
So that when i change the value of the constant, the OP appears
Now the goal would be to create a specific OP when I press a specific MIDI note
Can you help me with that ?
Thanks a lot !
snaut
January 27, 2025, 11:42am
5
Hi @Recma ,
What you would want to do is:
create a list of operators that you want to place when hitting certain midi buttons, something like [addSOP, constantTOP, baseCOMP, lineMAT]
next see how you can access the list items with your midi values. Would you do this in a Midi In DAT for example?
check out how to access list items in python: Access List Items in Python - GeeksforGeeks
Please share your process here and I will keep adding information.
cheers
Markus