Example #1
0
 def preset(self, instrumentNumber):
     if instrumentNumber >= 0 and instrumentNumber <= 8:
         osc.sendMsg("/inst/modalbar/preset", [int(instrumentNumber)])
Example #2
0
 def setPlaybackRate(self, rate):
     if rate > 0:
         osc.sendMsg("/inst/sndbuf/rate", [rate * 1.0])
Example #3
0
 def __init__(self):
     self.name = "mandolin"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #4
0
 def setAttackRate(self, seconds):
     if seconds > 0:
         osc.sendMsg("/inst/blowhole/rate", [seconds * 1.0])
Example #5
0
 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])
Example #6
0
 def __init__(self):
     self.name = "blowhole"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #7
0
 def setVent(self, vent):
     if vent >= 0 and vent <= 1:
         osc.sendMsg("/inst/blowhole/vent", [vent * 1.0])
Example #8
0
 def __init__(self):
     self.name = "blowhole"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #9
0
 def setReedStiffness(self, stiffness):
     if stiffness >= 0 and stiffness <= 1:
         osc.sendMsg("/inst/blowhole/reed", [stiffness * 1.0])
Example #10
0
 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])
Example #11
0
 def setFrequency(self, freq):
     osc.sendMsg("/inst/" + self.name + "/freq", [freq * 1.0])
Example #12
0
 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])
Example #13
0
 def damp(self, amount):
     if amount >= 0 and amount <= 1:
         osc.sendMsg("/inst/modalbar/damp", [amount * 1.0])
Example #14
0
 def strike(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/modalbar/strike", [strength * 1.0])
Example #15
0
 def damp(self, amount):
     if amount >= 0 and amount <= 1:
         osc.sendMsg("/inst/modalbar/damp", [amount * 1.0])
Example #16
0
 def setNoiseGain(self, gain):
     if gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/blowhole/noiseGain", [gain * 1.0])
Example #17
0
 def setFrequency(self, freq):
     osc.sendMsg("/inst/" + self.name + "/freq", [freq * 1.0])
Example #18
0
 def setToneHoleSize(self, size):
     if size >= 0 and size <= 1:
         osc.sendMsg("/inst/blowhole/tonehole", [size * 1.0])
Example #19
0
 def setNoiseGain(self, gain):
     if gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/blowhole/noiseGain", [gain * 1.0])
Example #20
0
 def setVent(self, vent):
     if vent >= 0 and vent <= 1:
         osc.sendMsg("/inst/blowhole/vent", [vent * 1.0])
Example #21
0
 def startBlowing(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/blowhole/startBlowing", [strength * 1.0])
Example #22
0
 def setPressure(self, pressure):
     if pressure >= 0 and pressure <= 1:
         osc.sendMsg("/inst/blowhole/pressure", [pressure * 1.0])
Example #23
0
 def setVibrato(self, freq, gain):
     if gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/bowed/vibratoFG", [freq * 1.0, gain * 1.0])
Example #24
0
 def startBlowing(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/blowhole/startBlowing", [strength * 1.0])
Example #25
0
 def setFile(self, filename):
     osc.sendMsg("/inst/sndbuf/read", [filename])
Example #26
0
 def stopBlowing(self, floatValue):
     if floatValue >= 0 and floatValue <= 1:
         osc.sendMsg("/inst/blowhole/stopBlowing", [floatValue * 1.0])
Example #27
0
 def setLoopRate(self, loopsPerSecond):
     if loopsPerSecond > 0:
         osc.sendMsg("/inst/sndbuf/loopRate", [loopsPerSecond * 1.0])
Example #28
0
 def setAttackRate(self, seconds):
     if seconds > 0:
         osc.sendMsg("/inst/blowhole/rate", [seconds * 1.0])
Example #29
0
 def __init__(self):
     self.name = "fmvoices"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #30
0
 def setBow(self, pressure, position):
     if pressure >= 0 and pressure <= 1 and position >= 0 and position <= 1:
         osc.sendMsg("/inst/bowed/bow", [pressure * 1.0, position * 1.0])
Example #31
0
 def strike(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/modalbar/strike", [strength * 1.0])
Example #32
0
 def setVibrato(self, freq, gain):
     if gain >= 0 and gain <= 1:
         osc.sendMsg("/inst/bowed/vibratoFG", [freq * 1.0, gain * 1.0])
Example #33
0
 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])
Example #34
0
 def setVolume(self, volume):
     if volume >= 0 and volume <= 1:
         osc.sendMsg("/inst/bowed/volume", [volume * 1.0])
Example #35
0
 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])
Example #36
0
 def stopBowing(self, floatValue):
     if floatValue >= 0 and floatValue <= 1:
         osc.sendMsg("/inst/bowed/stopBowing", [floatValue * 1.0])
Example #37
0
 def setReedStiffness(self, stiffness):
     if stiffness >= 0 and stiffness <= 1:
         osc.sendMsg("/inst/blowhole/reed", [stiffness * 1.0])
Example #38
0
 def setFile(self, filename):
     osc.sendMsg("/inst/sndbuf/read", [filename])
Example #39
0
 def setToneHoleSize(self, size):
     if size >= 0 and size <= 1:
         osc.sendMsg("/inst/blowhole/tonehole", [size * 1.0])
Example #40
0
 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])
Example #41
0
 def setPressure(self, pressure):
     if pressure >= 0 and pressure <= 1:
         osc.sendMsg("/inst/blowhole/pressure", [pressure * 1.0])
Example #42
0
 def setReadPosition(self, position):
     if position >= 0:
         osc.sendMsg("/inst/sndbuf/position", [int(position)])
Example #43
0
 def stopBlowing(self, floatValue):
     if floatValue >= 0 and floatValue <= 1:
         osc.sendMsg("/inst/blowhole/stopBlowing", [floatValue * 1.0])
Example #44
0
 def setPlaybackRate(self, rate):
     if rate > 0:
         osc.sendMsg("/inst/sndbuf/rate", [rate * 1.0])
Example #45
0
 def setBow(self, pressure, position):
     if pressure >= 0 and pressure <= 1 and position >= 0 and position <= 1:
         osc.sendMsg("/inst/bowed/bow", [pressure * 1.0, position * 1.0])
Example #46
0
 def setLooping(self, doLoop):
     if doLoop >= 0:
         osc.sendMsg("/inst/sndbuf/loop", [int(doLoop)])
Example #47
0
 def setVolume(self, volume):
     if volume >= 0 and volume <= 1:
         osc.sendMsg("/inst/bowed/volume", [volume * 1.0])
Example #48
0
 def setLoopRate(self, loopsPerSecond):
     if loopsPerSecond > 0:
         osc.sendMsg("/inst/sndbuf/loopRate", [loopsPerSecond * 1.0])
Example #49
0
 def stopBowing(self, floatValue):
     if floatValue >= 0 and floatValue <= 1:
         osc.sendMsg("/inst/bowed/stopBowing", [floatValue * 1.0])
Example #50
0
 def __init__(self):
     self.name = "sinosc"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #51
0
 def setReadPosition(self, position):
     if position >= 0:
         osc.sendMsg("/inst/sndbuf/position", [int(position)])
Example #52
0
 def __init__(self):
     self.name = "mandolin"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #53
0
 def setLooping(self, doLoop):
     if doLoop >= 0:
         osc.sendMsg("/inst/sndbuf/loop", [int(doLoop)])
Example #54
0
 def pluck(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/mandolin/pluck", [strength * 1.0])
Example #55
0
 def __init__(self):
     self.name = "sinosc"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #56
0
 def __init__(self):
     self.name = "fmvoices"
     osc.sendMsg("/init", [self.name])
     time.sleep(0.5)
Example #57
0
 def pluck(self, strength):
     if strength >= 0 and strength <= 1:
         osc.sendMsg("/inst/mandolin/pluck", [strength * 1.0])
Example #58
0
 def preset(self, instrumentNumber):
     if instrumentNumber >= 0 and instrumentNumber <= 8:
         osc.sendMsg("/inst/modalbar/preset", [int(instrumentNumber)])
Example #59
0
 def setVowel(self, vowel):
     if vowel >= 0 and vowel <= 1:
         osc.sendMsg("/inst/fmvoices/vowel", [vowel * 1.0])
Example #60
0
 def setGain(self, gain):
     if gain >= 0:  # and gain <= 1:
         osc.sendMsg("/inst/" + self.name + "/gain", [gain * 1.0])