本文整理汇总了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])
示例2: __init__
def __init__(self):
self.name = "mandolin"
osc.sendMsg("/init", [self.name])
time.sleep(0.5)
示例3: setPlaybackRate
def setPlaybackRate(self, rate):
if rate > 0:
osc.sendMsg("/inst/sndbuf/rate", [rate * 1.0])
示例4: setLoopRate
def setLoopRate(self, loopsPerSecond):
if loopsPerSecond > 0:
osc.sendMsg("/inst/sndbuf/loopRate", [loopsPerSecond * 1.0])
示例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])
示例6: setFile
def setFile(self, filename):
osc.sendMsg("/inst/sndbuf/read", [filename])
示例7: setReedStiffness
def setReedStiffness(self, stiffness):
if stiffness >= 0 and stiffness <= 1:
osc.sendMsg("/inst/blowhole/reed", [stiffness * 1.0])
示例8: setNoiseGain
def setNoiseGain(self, gain):
if gain >= 0 and gain <= 1:
osc.sendMsg("/inst/blowhole/noiseGain", [gain * 1.0])
示例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])
示例10: setFrequency
def setFrequency(self, freq):
osc.sendMsg("/inst/" + self.name + "/freq", [freq * 1.0])
示例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])
示例12: damp
def damp(self, amount):
if amount >= 0 and amount <= 1:
osc.sendMsg("/inst/modalbar/damp", [amount * 1.0])
示例13: setToneHoleSize
def setToneHoleSize(self, size):
if size >= 0 and size <= 1:
osc.sendMsg("/inst/blowhole/tonehole", [size * 1.0])
示例14: setVolume
def setVolume(self, volume):
if volume >= 0 and volume <= 1:
osc.sendMsg("/inst/bowed/volume", [volume * 1.0])
示例15: setVent
def setVent(self, vent):
if vent >= 0 and vent <= 1:
osc.sendMsg("/inst/blowhole/vent", [vent * 1.0])