oscclient测试小程序

天大地大妈咪最大 提交于 2019-11-26 22:08:39
from pythonosc.udp_client import SimpleUDPClient    # 从pythonosc包里导入udp_client

ip_remote = '192.168.0.195'     # 被发送到的ip
port_remote = 7008              # 远程端口

ip_localhost = '127.0.0.1'      # 本机地址
port_localhost = 5005           # 本机侦听端口

client = SimpleUDPClient(ip_localhost , port_localhost)   # 测试,发给本机
# client.send_message('/composition/layers/2/clips/1/connect',[1])    # Arena会响应
client.send_message('/composition/layers/2/clear',[1])
client.send_message('/volume',1.0)   # 浮点
client.send_message('/wakeonlan',1.0)   # 浮点


# client = SimpleUDPClient(ip_remote , port_remote)   # 发给远程主机
# # client.send_message('/composition/layers/2/clips/1/connect',[1])    # Arena会响应
# client.send_message('/composition/layers/2/clear',[1])
# client.send_message('/volume',1.0)   # 浮点
# client.send_message('/wakeonlan',1.0)   # 浮点

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!