Sending OSC messages in Python - klinke.studio
browse sections
Browse Notes
audio
computers
design
electrical-engineering
literature
math
ux-design

Sending OSC messages in Python

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!')