Has anyone hooked up a touch designer osc out chop with a sonic pi?
I’m trying to send the values of the touch designer to sonic pi with OSC but sonic pi can’t receieve OSC messages.
Can anyone help me?
Hello @HK800! Welcome to the forum!
I do not have any experience specifically with TouchDesigner, but I have used Sonic Pi to send and receive OSC messages with several other applications.
Just some basic things to consider:
Do you have the correct OSC port number for sending OSC messages to Sonic Pi on the TouchDesigner side? You can find this number in Preferences in Sonic Pi under the “IO” tab where it says “Incoming OSC Port” It is usually 4560, but it never hurts to check as I have seen it change occasionally. You should have this specific number included in TouchDesigner, so that it is sending the messgae to the correct place.
You should also check the “Cues” section of the IDE when sending OSC messages. Regardless of what code you might have to parse the incoming data in the OSC message, you will get a message that there was an OSC message received if it was correctly sent to Sonic Pi. If you aren’t seeing these types of messages, my assumption would be it is on the sending end of things, not Sonic Pi.
In my experience, in order to send or receive OSC messages from Sonic Pi to/from another application on my computer (p5.js, Hydra etc) I usually have to run a local server on my machine as well as some type of node bridge file that is usually provided by whoever developed the OSC library that works with that application
Here are examples of the Github repos for using OSC for p5.js and Hydra. you’ll see they both include using a local server.
Hydra OSC: https://github.com/ojack/hydra-osc
p5.js OSC: https://github.com/genekogan/p5js-osc
You may want to look into how that might work with TouchDesigner. I took a quick look at the docs on the TouchDesinger webpage for Out_CHOP but being unfamiliar with this software, I wasn’t able to make too much sense of it.
FInally, I did notice in your screen shot for TouchDesigner that the OSC message was “trigger/synth/n” but the “/n” was not part of the code in Sonic Pi. I don’t think this is probably your issue as you would still be seeing the incoming OSC messages in the Cues console that I mentioned earlier, but I figured it might be worth point out.
I hope that might provide you some help or direction to continue figuring this out.
Hello @HK800, welcome to our family
I’ve tried that what you are talking about and made it before but belive me I dont remember how to do it now I suppose, I’ve made it with looking this thread, you should check this up.
I’ve also tried to control Ableton from Sonic pi and using TDA(its like plug in for connection Touchdesigner and Ableton) to contol Touchdesigner from Ableton. Again I dont remember how to that niether because all my ald project files are gone with my old laptop. But there is a way to do that and if I remember someday I’ll wrtie here
I had a play with this. I can get Touch designer working both sending and receiving OSC messages with TouchOSC, but I can’t get Sonic Pi receiving OSC from it either on the local machine or on a remote machine. Not sure why. Sonic Pi will receive and send OSC messages to and from TouchOSC alright, so its rather odd. Looking at the log file on TouchOSC the OSC messages look OK.
Hello @mrbombmusic !
Thank you for all of your help.
The port number is correct between Sonic Pi and Touchdesigner.
I checked Cue but I couldn’t find those types of message what you sent.
Also I checked TouchDesigner webpage for Out Chop but I didn’t notice anything new.
Strangely, when I connect the Touch Designer to the 4560, the Sonic pi itself stops playing sound.
I have to close the Touch Designer once, restart the Sonic Pi and finally the sound comes back.
I think TouchOSC is working correctly , but Sonic Pi is not able to process the message for some reason.
I’ll keep trying a little more…