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


Python osc.sendMsg函数代码示例

本文整理汇总了Python中myro.osc.sendMsg函数的典型用法代码示例。如果您正苦于以下问题:Python sendMsg函数的具体用法?Python sendMsg怎么用?Python sendMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: strike

 def strike(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/modalbar/strike", [strength * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例2: __init__

 def __init__(self):
     self.name = "mandolin"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:4,代码来源:chuck.py

示例3: setPlaybackRate

 def setPlaybackRate(self, rate):
     if rate > 0:
         osc.sendMsg("/inst/sndbuf/rate", [rate * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例4: setLoopRate

 def setLoopRate(self, loopsPerSecond):
     if loopsPerSecond > 0:
         osc.sendMsg("/inst/sndbuf/loopRate", [loopsPerSecond * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例5: noteOff

 def noteOff(self, velocity):
     if self.name == "sinosc" or self.name == "sndbuf":
         osc.sendMsg("/inst/" + self.name + "/gain", [0.0])
     else:
         osc.sendMsg("/inst/" + self.name + "/noteOff", [velocity * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:5,代码来源:chuck.py

示例6: setFile

 def setFile(self, filename):
     osc.sendMsg("/inst/sndbuf/read", [filename])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:2,代码来源:chuck.py

示例7: setReedStiffness

 def setReedStiffness(self, stiffness):
     if stiffness >= 0 and stiffness <= 1:
         osc.sendMsg("/inst/blowhole/reed", [stiffness * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例8: setNoiseGain

 def setNoiseGain(self, gain):
     if gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/blowhole/noiseGain", [gain * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例9: setVibrato

 def setVibrato(self, vibratoFreq, vibratoGain, noiseGain):
     if vibratoGain >= 0 and vibratoGain <= 1 and noiseGain >= 0 and noiseGain <= 1:
         osc.sendMsg("/inst/blowbotl/vibrato", [vibratoFreq * 1.0,
                                            vibratoGain * 1.0,
                                            noiseGain * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:5,代码来源:chuck.py

示例10: setFrequency

 def setFrequency(self, freq):
     osc.sendMsg("/inst/" + self.name + "/freq", [freq * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:2,代码来源:chuck.py

示例11: setMode

 def setMode(self, mode, ratio, radius, gain):
     if mode >= 0 and mode <= 1 and radius >= 0 and radius <= 1 and gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/modalbar/mode", [int(mode), ratio * 1.0,
                                         radius * 1.0, gain * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:4,代码来源:chuck.py

示例12: damp

 def damp(self, amount):
     if amount >= 0 and amount <= 1:
         osc.sendMsg("/inst/modalbar/damp", [amount * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例13: setToneHoleSize

 def setToneHoleSize(self, size):
     if size >= 0 and size <= 1:
         osc.sendMsg("/inst/blowhole/tonehole", [size * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例14: setVolume

 def setVolume(self, volume):
     if volume >= 0 and volume <= 1:
         osc.sendMsg("/inst/bowed/volume", [volume * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py

示例15: setVent

 def setVent(self, vent):
     if vent >= 0 and vent <= 1:
         osc.sendMsg("/inst/blowhole/vent", [vent * 1.0])
开发者ID:BrendanBenshoof,项目名称:myro-epuck,代码行数:3,代码来源:chuck.py


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