Remote control using Python, OSC and TouchOSC App

This tutorial explains how to make a smartphone based remote control using the App TouchOSC to create the control panel and the library pyOSC to receive the command from your smartphone

TouchOSC is a modular OSC and MIDI control surface for iPhone,iPod Touch, iPad and Android made by Hexler. It supports sending and receiving Open Sound Control and MIDI messages over Wi-Fi and CoreMIDI inter-app

Open Sound Control or OSC is Open Sound Control (OSC) is a protocol for networking sound synthesizers, computers, and other multimedia devices for purposes such as musical performance or show control. OSC's advantages include interoperability, accuracy, flexibility and enhanced organization and documentation.

Installing pyOSC

pyOSC is a a simple OpenSoundControl implementation in Python providing support for OSC-bundles, a simple OSC-client, a simple OSC-server, threading & forking OSC-servers.

To install pyOSC type:

~# git clone git://
~# cd pyOSC/
~/pyOSC# python install

Install and configure TouchOSC on your smartphone

Touch OSC is available on Apple store or Google Play:

Control a Daisy-11 strip of led module:

The following python example shows how to control some GPIO lines from touchOS. We use a Daisy-11 led module plugged on a Terra board.

Run this program an Aria G25:

On the smartphone open the TouchOSC app configuration, then the CONNECTIONS-->OSC screen and fill the Host field with board IP address.
From the LAYOUT section select LiveControl then press Done.
Inside the TouchOSC panel select tha Pads tab then touch some buttons.

Related links