大量的Python OSC模块-使用哪个模块? [英] A plethora of Python OSC modules - which one to use?

查看:386
本文介绍了大量的Python OSC模块-使用哪个模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开放式声音控制(OSC)是一种用于计算机,声音合成器和其他多媒体设备之间通信的协议,该协议针对现代联网技术进行了优化.将OSC与MAX/MSP结合使用特别常见-实际上,这就是我正在做的事情,将OSC与Python结合使用可与MAX中的另一个子系统进行通讯.

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.

有一堆支持OSC的python模块.伟大的.他们都声称自己简单,有用和完美.冒着进入主观领域的风险,您的经验对以下模块提出了哪些用例建议?

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?

  • python-osc
  • pyOSC
  • SimpleOSC (though this seems like an older module)

由于我对OSC仅有一点了解,因此我认为一个简单的实现将对我最好.我正在使用Python 2.7.

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.

推荐答案

我在OSX上使用pyOSC取得了巨大的成功.该代码的开发尚不充分,但这很可能是由于其稳定性和简单性.我短暂尝试过 txosc ,它可能需要进一步测试.

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.

我对Pyosc的使用受到限制,但效果很好.例如.

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)

这篇关于大量的Python OSC模块-使用哪个模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆