来自 python-osc 客户端的 OSC 消息未被 Chuck 服务器接收
OSC messages from a python-osc client are not picked up by ChucK server
我正在尝试在 chuck and python via the OSC (Open Sound Control) protocol. On the python side we're using the python-osc library 和 chuck 之间建立通信,chuck 本机支持 OSC 协议。看起来我们从 python 端发送的消息并没有到达 chuck 端。所有其他组合,即 python 到 python、chuck 到 chuck 和 chuck 到 python 都工作正常。
我是 运行 python 3.4.4 windows 7。
这里可能出了什么问题?
这是我用于测试的 client/server 实现的四个文件。
chuck_client.py:
OscSend xmit;
xmit.setHost("localhost", 5005);
<<<"Sending">>>;
xmit.startMsg("/debug");
chuck_server.py:
OscRecv orec;
5005 => orec.port;
orec.listen();
orec.event("/debug") @=> OscEvent e;
<<<"Waiting">>>;
e => now;
<<<"Received">>>;
python_client.py:
from pythonosc import osc_message_builder
from pythonosc import udp_client
client = udp_client.UDPClient('localhost', 5005)
msg = osc_message_builder.OscMessageBuilder(address="/debug")
msg = msg.build()
print('Sending')
client.send(msg)
python_server.py:
from pythonosc import dispatcher
from pythonosc import osc_server
dispatcher = dispatcher.Dispatcher()
dispatcher.map("/debug", lambda _: print('Received'))
print('Waiting')
server = osc_server.ThreadingOSCUDPServer(
('localhost', 5005), dispatcher)
print("Serving on {}".format(server.server_address))
server.serve_forever()
这似乎是 python-osc 1.5 中的错误。在 1.6 版中,提供的示例可以正常工作。参考:https://github.com/attwad/python-osc/issues/31
我正在尝试在 chuck and python via the OSC (Open Sound Control) protocol. On the python side we're using the python-osc library 和 chuck 之间建立通信,chuck 本机支持 OSC 协议。看起来我们从 python 端发送的消息并没有到达 chuck 端。所有其他组合,即 python 到 python、chuck 到 chuck 和 chuck 到 python 都工作正常。 我是 运行 python 3.4.4 windows 7。 这里可能出了什么问题?
这是我用于测试的 client/server 实现的四个文件。
chuck_client.py:
OscSend xmit;
xmit.setHost("localhost", 5005);
<<<"Sending">>>;
xmit.startMsg("/debug");
chuck_server.py:
OscRecv orec;
5005 => orec.port;
orec.listen();
orec.event("/debug") @=> OscEvent e;
<<<"Waiting">>>;
e => now;
<<<"Received">>>;
python_client.py:
from pythonosc import osc_message_builder
from pythonosc import udp_client
client = udp_client.UDPClient('localhost', 5005)
msg = osc_message_builder.OscMessageBuilder(address="/debug")
msg = msg.build()
print('Sending')
client.send(msg)
python_server.py:
from pythonosc import dispatcher
from pythonosc import osc_server
dispatcher = dispatcher.Dispatcher()
dispatcher.map("/debug", lambda _: print('Received'))
print('Waiting')
server = osc_server.ThreadingOSCUDPServer(
('localhost', 5005), dispatcher)
print("Serving on {}".format(server.server_address))
server.serve_forever()
这似乎是 python-osc 1.5 中的错误。在 1.6 版中,提供的示例可以正常工作。参考:https://github.com/attwad/python-osc/issues/31