当前位置: 首页>>代码示例>>Python>>正文


Python OSCMessage.extend方法代码示例

本文整理汇总了Python中OSC.OSCMessage.extend方法的典型用法代码示例。如果您正苦于以下问题:Python OSCMessage.extend方法的具体用法?Python OSCMessage.extend怎么用?Python OSCMessage.extend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OSC.OSCMessage的用法示例。


在下文中一共展示了OSCMessage.extend方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: sendOscMessage

# 需要导入模块: from OSC import OSCMessage [as 别名]
# 或者: from OSC.OSCMessage import extend [as 别名]
def sendOscMessage(_x, _y, _w, _h):
    if x > 1 and y > 1:
        global client

        connectOsc()

        msg = OSCMessage("/shast/coordinates")
        msg.extend([_x, _y, _w, _h])
        client.send( msg )
开发者ID:hiperorganicos,项目名称:SHAST,代码行数:11,代码来源:old_motion.py

示例2: relayMessageCallback

# 需要导入模块: from OSC import OSCMessage [as 别名]
# 或者: from OSC.OSCMessage import extend [as 别名]
def relayMessageCallback(path, tags, args, source):
	global faderLightFeedback
#	print "--- received:"
#	print "path="+str(path)
#	print "tags="+str(tags)
#	print "args="+str(args)
#	print "source="+str(source)
	for client in clients:
		msg = OSCMessage(path)
		msg.extend(args)
		client[0].send(msg)
		print "relaying to " + str(client[1]) + " : " + str(msg)
开发者ID:meelow,项目名称:LEDita,代码行数:14,代码来源:relayOSC.py

示例3: transect_handler

# 需要导入模块: from OSC import OSCMessage [as 别名]
# 或者: from OSC.OSCMessage import extend [as 别名]
 def transect_handler(osc_path=None, osc_tags=None, osc_args=None, osc_source=None):
     node = osc_args[0]
     idx = osc_args[1]
     curr_amp = float(osc_args[2])
     lookup = osc_args[3:] #ignores the amplitude
     dists, indices = tree.query(lookup, k=n_results, return_distance=True)
     dists = dists.flatten()
     indices = indices.flatten()
     print "hunting", lookup
     times = sample_times[indices]
     makeup_gains = (curr_amp/amps[indices])
     # send scsynth bus messages
     print "dispatching", bus_num, n_results*3, times, makeup_gains, dists
     msg = OSCMessage("/c_setn", [bus_num, n_results*3])
     #msg.extend() 
     msg.extend(times)
     msg.extend(makeup_gains)
     msg.extend(dists)
     sc_synth_client.sendto(msg, ("127.0.0.1", sc_synth_port))
开发者ID:howthebodyworks,项目名称:pattern_machine,代码行数:21,代码来源:ps_correl_serve.py


注:本文中的OSC.OSCMessage.extend方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。