A plethora of Python OSC modules - which one to use?

Wes Modes picture Wes Modes · Mar 3, 2014 · Viewed 20.1k times · Source

Open Sound Control (OSC) is a protocol for communication among computers, sound synthesizers, and other multimedia devices that is optimized for modern networking technology. It is particularly common to use OSC with MAX/MSP -- which in fact is what I am doing, using OSC with Python to talk to another subsystem in MAX.

There are a bunch of python modules that support OSC. Great. And they all claim to be simple, useful, and perfect. At the risk of verging into subjective territory, what use cases does your experience suggest for the following modules?

I suppose a simple implementation would serve me best since I have only a glancing familiarity with OSC. And I'm using Python 2.7.

Answer

Dan McAnulty picture Dan McAnulty · Jan 23, 2018

For anyone else who runs across this stackoverflow question every time they're looking for a python OSC implementation and who needs a working OSC implementation for Python 3 – I can confirm that osc4py3 works well and is well documented.

My survey results from Jan 22 2018:

pyOSC: does not seem to be maintained and I could not find a working Python3 version, some links I found to versions that claimed to be updated for python3 were broken.

aiosc: worked in testing (and seemed like a cool implementation) but for some reason it failed with a "Too many open files" error after a few seconds at the bandwidth I needed.

osc4py3: installed with pip, worked well, and gave me zero problems with around a thousand messages per second, as long as I made sure to call osc_process() after every message.

There may be another OSC version out there that is especially well designed for py3k and that more people are using, but since the field is still a little opaque I felt like this is probably the most appropriate place to share this. I hope it saves someone else a little time.