oscclient测试小程序

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)   # 浮点

 

posted @ 2019-08-11 07:38  喜如妖  阅读(220)  评论(0编辑  收藏  举报