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