oscclient测试小程序
发布时间:2020-12-20 12:42:36 所属栏目:Python 来源:网络整理
导读: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 # 本机侦听端口 cl
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) # 浮点 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |