Thursday, April 02, 2009

OSC control from iPhone to pd on Mac

Everyone seems to be using Open Sound Control (OSC), so I figured I'd try controlling pd (aka Pure Data) on my MacBook from my iPhone using the TouchOSC app.

Here is how you do it...

1) Get a recent build of pd, I used this build.

2) Set up a new computer-to-computer WiFi network:

Create Computer-to-Computer network

Create Computer-to-Computer network

3) Connect to the WiFi network "osc" on your iPhone.

4) Find your PC's IP address on that computer-to-computer WiFi network:

Check your IP address

5) Put your IP address into the "Host" configuration on TouchOSC on your iPhone, and set your outgoing port:

TouchOSC Configuration

6) Set up your pd patch:

OSC pd Example

"dumpOSC 9999" receives on port 9999, "OSCroute" parses the command, and I use "unpack" to grab the second element of the message, which is the fader value or toggle setting:

6) Play!

1 comment:

Anonymous said...

Thank you so much. I had a student version of Max Msp that recently expired. I had TouchOSC and Max Msp working well together and then it expired. This simple demo has helped me get back up and running.