Create An Ad-Hoc Network For TouchOSC On Your Mac

After coding for iPhone for the last month and a half, I figured it was time I finally got one of the coveted devices for myself. This week I have been having fun setting it up, checking my email, and browsing the app store. They really are a marvel of technology and raise my expectaions in terms of elegance and functionality for all devices.

Today, in addition to working hard on my upcoming app release (which I am very excited about) I have been playing with the TouchOSC app from TouchOSC, available from the Apple App Store, provides several touchable interfaces including virtual faders, cross-faders, knobs, pads, keys, buttons, grids and x-y pads; all of which send OSC data over Wi-Fi using UDP. It is kind of  like a mini JazzMutant Lemur in your pocket.

The OSC data from TouchOSC can be used in software capable of receiving OSC messages, such as MaxMSP or Processing, or you can parse the OSC data to MIDI and then on to any MIDI controllable software such as Ableton Live. To translate the OSC to MIDI on a Mac I highly recommend you check out OSCulator. If you own Max you could build yourself a maxpat to do the same thing but OSCulator is prebuilt and there are some excellent presets available on the website. Mac users will find instructions on using TouchOSC with Osculator and Ableton Live here. Windows users will find instructions to do something similar using a combination of Pure Data and MIDI Yoke here.

Setting up TouchOSC on your home wi-fi network is a piece of cake. All you have to do is open the TouchOSC Network settings and set the host and the  outgoing and incoming ports. The ports can be whatever you want to use; I use 8000 for outgoing and 9000 for the incoming port. The host should just be YOURCOMPUTENAME.local. This worked flawlessly for me the first time I tried it.

If however you are not at home, or are somewhere without wi-fi, and you want to use TouchOSC with your MacBook or MacBookPro, you need to create an ad-hoc wireless network. All an ad-hoc network is is a wireless network where the communciation between devices is direct, rather than through an access point or a router. Here are the steps to create an ad-hoc network and set up TouchOSC to communicate with your Mac:

1. Open up System Preferences->Network.

2. Click on the Network Name drop down and select  Create Network.

3. Give your network a name. A password is optional though probably a good idea.

4. Click on Advanced.

5. Click on the TCP/IP tab.

6. Click the Configure IPv4 drop down and select Manual.

7. Enter an IP and NetMask for your computer. I use and

8. Click OK and then Apply and close System Preferences.

9. On your iPhone open Settings->Wi-Fi and select the network you just created.

10. Click the arrow to the right of the network name.

11. Select Static for your IP type and enter your IP and NetMask for the iPhone. I use for the IP. The NetMask must be the same as for the network which is

12. Exit your iPhone settings and open TouchOSC.

13. Touch the field under the heading Network.

14. Enter the IP address you created for your Mac. In my case this is

15. Make sure your ports are as you want them. Remember, the ports can be whatever you want to use, just make sure that they agree with whatever you are communicating with, ie OSCulator, MaxMSP, Processing etc. I use 8000 for the outgoing port and 9000 for the incoming port.

16. Touch the done button and then once you are at the mainscreen of TouchOSC, select your Layout and touch done again.

It sometimes takes a few seconds to connect to the network and open the TouchOSC Layout but once it opens you should be able to communicate with your Mac over the ad-hoc wireless network. To test out the ad-hoc network try using OSCulator or one of the Max patches provided on This is what worked for me; hopefully you will find that these instructions get you up and running TouchOSC over an ad-hoc network too. If you have any problems please leave a comment and I will do my best to help you.

Related posts