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