pythonpython-moduleosc

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


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.


Solution

  • I have used pyOSC with great success on OSX. The code isn't under much development but this is most likely due to it's stability and simplicity. I briefly tried txosc and it may warrant further testing.

    My usage of pyosc is limited but it works well. eg.

    import OSC
    c = OSC.OSCClient()
    c.connect(('127.0.0.1', 57120))   # connect to SuperCollider
    oscmsg = OSC.OSCMessage()
    oscmsg.setAddress("/startup")
    oscmsg.append('HELLO')
    c.send(oscmsg)