OSC noob question

I just started playing with sonic this week and and experimenting with OSC and control surfaces. My question is twofold:

Is there a good overview on paradigms for using OSC and external controllers - beyond just sync and retrieving values?

secondly, I played with OSC/Pilot and can send OSC messages to Sonic - but I’m confused why the full path, network address and port, are part of the message. For example:

x = sync “/osc:”

if I don’t fully specify the network address, I can’t sync on the control element. This obviously seems like something’s not configured correctly. Am I missing something?


The network ip address and sending port are included so that you can if you want distinguish between different IP addresses, or more than one source from the same ip address using different ports to send. Usually this is not the case, and it is better to sync using x = sync "/osc*/PADX"
the * is a wild card which will match any ip addresses and sending port sending a message to /PADX
Including this information is a feature of Sonic Pi.

You can do a great deal with OSC messages. I have used them a lot in many projects, and particularly in conjunction with the TouchOSC interface, and also with python osc servers to interact with hardware running on Raspberry Pi.

An advanced project I did with TouchOSC was an alarm clock which is entirely driven by osc messages between the interface and Sonic Pi.

Thanks Robin. That’s very helpful!

I took a look at your alarm clock code and see you’re the same Robin who wrote the code or the 16-segment Sequencer. I tried to get that running on TouchOCS - I get the two talking but can’t get it to play any audio… not sure why not…

Code for the sequencer needed updating. Written for earlier Sonic Pi and OSC code interface changed. I’ve updated it on the gist now and works with later version.

Thanks Robin.

I took a look at the code, and was curious how one best debugs sonic given the concurrent/asynchronous nature of the code. Are there any debugging tools/methods you recommend?