Open Sound Control (OSC) - klinke.studio

Open Sound Control (OSC)

browse sections

Open Sound Control (OSC)

Open Sound Control is a network protocol for sending structured, real-time control messages between computers, microcontrollers, and audio/visual software. It is widely used in interactive systems because it is lightweight, human-readable, and extensible (Wright & Freed, 1997).

Message anatomy

An OSC message typically contains:

  • Port: UDP port on the receiver.
  • Address: a path-like string (e.g., /pose/x).
  • Arguments: typed values (e.g., numbers, strings, arrays).

Example address patterns:

  • /pose/x
  • /hand/left/index_tip
  • /sensor/distance

Sending OSC messages in Python

Using python-osc, you can create a UDP client and send typed messages to an OSC receiver.

from pythonosc.udp_client import SimpleUDPClient

osc_client = SimpleUDPClient('127.0.0.1', 12345)

osc_client.send_message('/address', [1, 2, 3])
osc_client.send_message('/address/subaddress', 1)
osc_client.send_message('/address', 1.0)
osc_client.send_message('/address', 'Hello, World!')
Wright, M., & Freed, A. (1997). Open Sound Control: A New Protocol for Communicating with Sound Synthesizers. Proceedings of the International Computer Music Conference. https://cnmat.berkeley.edu/publications/open_sound_control_new_protocol
  • Wright, Matthew, Freed, Adrian (1997). Open Sound Control: A New Protocol for Communicating with Sound Synthesizers. Proceedings of the International Computer Music Conference. wright1997aa