Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-09-28 20:48:09 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-09-28 20:48:09 (GMT)
commit6cb986afe01cb3059a49a3ae82531d4501f625d5 (patch)
tree036ad7efb2f550af33c4b0e41c94de6c43160835
parent817f78c0b21d932ffe1aefef48f7361d3fdce240 (diff)
amplitude scaling for each instrument + misc fix
-rw-r--r--TamTamMini.activity/Mini/miniTamTamMain.py44
-rw-r--r--TamTamMini.activity/Mini/miniToolbars.py11
-rw-r--r--common/Config.py285
-rw-r--r--common/Util/CSoundClient.py3
4 files changed, 176 insertions, 167 deletions
diff --git a/TamTamMini.activity/Mini/miniTamTamMain.py b/TamTamMini.activity/Mini/miniTamTamMain.py
index 3b1a68c..eb73577 100644
--- a/TamTamMini.activity/Mini/miniTamTamMain.py
+++ b/TamTamMini.activity/Mini/miniTamTamMain.py
@@ -41,7 +41,7 @@ class miniTamTamMain(gtk.EventBox):
def __init__(self, activity):
gtk.EventBox.__init__(self)
-
+
self.activity = activity
self.set_border_width(Config.MAIN_WINDOW_PADDING)
@@ -105,7 +105,7 @@ class miniTamTamMain(gtk.EventBox):
if 'a good idea' == True:
self.playStartupSound()
- self.synthLabWindow = None
+ #self.synthLabWindow = None
self.beatPickup = True
@@ -139,8 +139,8 @@ class miniTamTamMain(gtk.EventBox):
#Play button Image
self.playButtonImg = gtk.Image()
self.playButtonImg.set_from_icon_name('media-playback-start', gtk.ICON_SIZE_LARGE_TOOLBAR)
- self.playButtonImg.show()
-
+ self.playButtonImg.show()
+
#Stop button Image
self.stopButtonImg = gtk.Image()
self.stopButtonImg.set_from_icon_name('media-playback-stop', gtk.ICON_SIZE_LARGE_TOOLBAR)
@@ -181,15 +181,15 @@ class miniTamTamMain(gtk.EventBox):
geneSliderBox = gtk.VBox()
self.geneSliderBoxImgTop = gtk.Image()
self.geneSliderBoxImgTop.set_from_file(Config.IMAGE_ROOT + 'complex6.png')
- geneAdjustment = gtk.Adjustment(value=self.regularity, lower=0, upper=1, step_incr=0.01, page_incr=0, page_size=0)
- geneSlider = ImageVScale( Config.IMAGE_ROOT + "sliderbutbleu.png", geneAdjustment, 5 )
- geneSlider.set_inverted(False)
- geneSlider.set_size_request(15,305)
- geneAdjustment.connect("value_changed" , self.handleGenerationSlider)
- geneSlider.connect("button-release-event", self.handleGenerationSliderRelease)
+ self.geneAdjustment = gtk.Adjustment(value=self.regularity, lower=0, upper=1, step_incr=0.01, page_incr=0, page_size=0)
+ self.geneSlider = ImageVScale( Config.IMAGE_ROOT + "sliderbutbleu.png", self.geneAdjustment, 5 )
+ self.geneSlider.set_inverted(False)
+ self.geneSlider.set_size_request(15,305)
+ self.geneAdjustment.connect("value_changed" , self.handleGenerationSlider)
+ self.geneSlider.connect("button-release-event", self.handleGenerationSliderRelease)
geneSliderBox.pack_start(self.geneSliderBoxImgTop, False, padding=10)
- geneSliderBox.pack_start(geneSlider, True, 20)
- self.tooltips.set_tip(geneSlider,Tooltips.COMPL)
+ geneSliderBox.pack_start(self.geneSlider, True, 20)
+ self.tooltips.set_tip(self.geneSlider,Tooltips.COMPL)
beatSliderBox = gtk.VBox()
self.beatSliderBoxImgTop = gtk.Image()
@@ -378,16 +378,16 @@ class miniTamTamMain(gtk.EventBox):
def recordOverSensitivity( self, state ):
self._recordToolbar.keyboardRecOverButton.set_sensitive( state )
- def synthLabWindowOpen(self):
- return self.synthLabWindow != None and self.synthLabWindow.get_property('visible')
+ #def synthLabWindowOpen(self):
+ #return self.synthLabWindow != None and self.synthLabWindow.get_property('visible')
def loadMicInstrument( self, data ):
self.csnd.load_mic_instrument( data )
- def closeSynthLab(self):
- if self.synthLabWindow != None:
- self.synthLabWindow.destroy()
- self.synthLabWindow = None
+ #def closeSynthLab(self):
+ #if self.synthLabWindow != None:
+ #self.synthLabWindow.destroy()
+ #self.synthLabWindow = None
def regenerate(self):
def flatten(ll):
@@ -442,6 +442,12 @@ class miniTamTamMain(gtk.EventBox):
img = self.scale(self.beat,2,12,1,11)
self.beatSliderBoxImgTop.set_from_file(Config.IMAGE_ROOT + 'beat' + str(img) + '.png')
self.beatAdjustment.set_value(self.beat)
+
+ self.regularity = random.randint(50, 100) * 0.01
+ img = int(self.regularity * 7)+1
+ self.geneSliderBoxImgTop.set_from_file(Config.IMAGE_ROOT + 'complex' + str(img) + '.png')
+ self.geneAdjustment.set_value(self.regularity)
+
self.sequencer.beat = self.beat
self.loop.beat = self.beat
self.drumFillin.setBeats( self.beat )
@@ -590,7 +596,7 @@ class miniTamTamMain(gtk.EventBox):
duration = 20,
trackId = 1,
instrumentId = Config.INSTRUMENTS[instrument].instrumentId,
- reverbSend = 0,
+ reverbSend = self.reverb,
tied = False,
mode = 'mini'),
secs_per_tick)
diff --git a/TamTamMini.activity/Mini/miniToolbars.py b/TamTamMini.activity/Mini/miniToolbars.py
index 057262b..89f623b 100644
--- a/TamTamMini.activity/Mini/miniToolbars.py
+++ b/TamTamMini.activity/Mini/miniToolbars.py
@@ -17,7 +17,7 @@ class playToolbar(gtk.Toolbar):
self.separator = gtk.SeparatorToolItem()
self.separator.set_draw(True)
self.insert(self.separator,-1)
- self.separator.show()
+ self.separator.show()
self.toolbox = toolbox
self.miniTamTam = miniTamTam
@@ -92,7 +92,7 @@ class recordToolbar(gtk.Toolbar):
self.separator = gtk.SeparatorToolItem()
self.separator.set_draw(True)
self.insert(self.separator,-1)
- self.separator.show()
+ self.separator.show()
self.toolbox = toolbox
self.miniTamTam = miniTamTam
@@ -134,8 +134,8 @@ class recordToolbar(gtk.Toolbar):
self.insert(self.keyboardRecOverButton, -1)
self.keyboardRecOverButton.show()
self.keyboardRecOverButton.set_tooltip(_('Click to add a loop'))
- self.keyboardRecOverButton.set_sensitive(False)
-
+ #self.keyboardRecOverButton.set_sensitive(False)
+
self.keyboardRecMinusButton = ToolButton('minusrec')
self.keyboardRecMinusButton.connect('clicked', self.miniTamTam.sequencer.clearSequencer )
self.insert(self.keyboardRecMinusButton, -1)
@@ -148,5 +148,4 @@ class recordToolbar(gtk.Toolbar):
self.loopSetButton.connect('clicked', self.miniTamTam.handleLoopSettingsBtn)
self.insert(self.loopSetButton, -1)
self.loopSetButton.show()
- self.loopSetButton.set_tooltip(_('Add new sound'))
- \ No newline at end of file
+ self.loopSetButton.set_tooltip(_('Add new sound'))
diff --git a/common/Config.py b/common/Config.py
index 1ee8998..3ea32cb 100644
--- a/common/Config.py
+++ b/common/Config.py
@@ -78,7 +78,7 @@ for i in range(0,13):
KIT_ELEMENT = tuple(KIT_ELEMENT)
class Instrument:
- def __init__( self, name, instrumentId, csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, kit = None ):
+ def __init__( self, name, instrumentId, csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, ampScale = 1, kit = None ):
self.name = name
self.instrumentId = instrumentId
self.csoundInstrumentId = csoundInstrumentId
@@ -88,6 +88,7 @@ class Instrument:
self.loopStart = loopStart
self.loopEnd = loopEnd
self.crossDur = crossDur
+ self.ampScale = ampScale
self.kit = kit
#print (self.name, self.instrumentId, self.csoundInstrumentId, self.instrumentRegister, self.soundClass, self.category, self.loopStart, self.loopEnd, self.crossDur)
@@ -107,147 +108,147 @@ instrumentDB = InstrumentDB.getRef()
_nextInstrumentId = [0]
INSTRUMENTS = {}
-def _addInstrument( name, csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, kit = None ):
+def _addInstrument( name, csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, ampScale = 1, kit = None ):
if not QUICKLOAD or name[0:4] == "drum" or name in ["flute", "kalimba"]: # quick load
- INSTRUMENTS[name] = Instrument( name, _nextInstrumentId[0], csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, kit )
+ INSTRUMENTS[name] = Instrument( name, _nextInstrumentId[0], csoundInstrumentId, instrumentRegister, soundClass, category, loopStart, loopEnd, crossDur, ampScale, kit )
instrumentDB.addInstrumentFromArgs( name, name, instrumentRegister, loopStart, loopEnd, crossDur, name, LIB_DIR+"/Images/"+name+".png", [ category ] )
_nextInstrumentId[0] += 1
-_addInstrument( "mic1", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01 )
-_addInstrument( "mic2", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01 )
-_addInstrument( "mic3", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01 )
-_addInstrument( "mic4", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01 )
-_addInstrument( "lab1", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "lab2", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "lab3", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "lab4", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "lab5", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "lab6", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0 )
-_addInstrument( "ounk", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "gam", INST_TIED, HIGH, 'melo', 'percussions', .69388, .7536, .02922 )
-_addInstrument( "guit", INST_TIED, MID, 'melo', 'strings', .08592, .75126, .33571 )
-_addInstrument( "koto", INST_TIED, HIGH, 'melo', 'strings', .56523, .70075, .05954 )
-_addInstrument( "clarinette", INST_TIED, MID, 'melo', 'winds', .57905, .73319, .04934 )
-_addInstrument( "flute", INST_TIED, MID, 'melo', 'winds', .47169, .53693, .02481 )
-_addInstrument( "drum1hatpedal", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1hatshoulder", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1hardride", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1ridebell", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1snare", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1snaresidestick", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1crash", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1splash", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1tom", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1floortom", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0)
-_addInstrument( "drum1chine", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum1kick", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "piano", INST_TIED, MID, 'melo', 'keyboard', 0.8883, 1.420524, .13575 )
-_addInstrument( "dog", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "duck", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "drum2darbukadoom", INST_SIMP, LOW, 'drum', 'percussions', 0, 0 ,0 )
-_addInstrument( "drum2darbukapied", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2darbukapiedsoft", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2hatflanger", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2darbukatak", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2darbukafinger", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2darbukaroll", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2darbukaslap", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2hatpied", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2tambourinepied", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2hatpied2", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum2tambourinepiedsoft", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3cowbell", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3cowbelltip", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0)
-_addInstrument( "drum3cup", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3djembelow", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3djembemid", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3djembesidestick", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3djembeslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3djembestickmid", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3metalstand", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3pedalperc", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3rainstick", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3tambourinehigh", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum3tambourinelow", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "harmonica", INST_TIED, MID, 'melo', 'winds', .1531, .19188, .01792 )
-_addInstrument( "alarm", INST_TIED, MID, 'melo', 'concret', 1.37555859375, 2.0286015625, .0675 )
-_addInstrument( "bird", INST_TIED, MID, 'melo', 'animals', .1, 1, .05 )
-_addInstrument( "cat", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "duck2", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "bottle", INST_TIED, MID, 'melo', 'concret', .20532, .41064, .05292 )
-_addInstrument( "clang", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "ow", INST_SIMP, MID, 'melo', 'people', 0, 0, 0 )
-_addInstrument( "sheep", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "water", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "zap", INST_TIED, MID, 'melo', 'keyboard', .299, .7323, .09895 )
-_addInstrument( "trumpet", INST_TIED, MID, 'melo', 'winds', .39934, .45537, .02729)
-_addInstrument( "bubbles", INST_TIED, MID, "melo", 'concret', 0.02, 1.177, 0.02)
-_addInstrument( "marimba", INST_TIED, MID, "melo", 'percussions', .26545, .33098, .03087)
-_addInstrument( "triangle", INST_TIED, MID, "melo", 'percussions', 1.21002, 1.31805, .01268)
-_addInstrument( "laugh", INST_SIMP, MID, 'melo', 'people', 0, 0, 0 )
-_addInstrument( "voix", INST_TIED, MID, 'melo', 'people', .89608, .96092, .02343 )
-_addInstrument( "cling", INST_TIED, MID, 'melo', 'keyboard', .09096, .7878, .18026 )
-_addInstrument( "byke", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "door", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "basse", INST_TIED, MID, 'melo', 'strings', 0.50470875, 0.833315, 0.09375 )
-_addInstrument( "acguit", INST_TIED, MID, 'melo', 'strings', 1.4037, 1.84235625, 0.2 )
-_addInstrument( "diceinst", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "didjeridu", INST_TIED, LOW, 'melo', 'winds', .55669, 1.73704, .09178 )
-_addInstrument( "harmonium", INST_TIED, MID, 'melo', 'keyboard', .04674, .41073, .18384 )
-_addInstrument( "horse", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0 )
-_addInstrument( "kalimba", INST_TIED, MID, 'melo', 'percussions', .20751, .30161, .04658 )
-_addInstrument( "mando", INST_TIED, MID, 'melo', 'strings', 0.316548, 0.532008, 0.02875 )
-_addInstrument( "ocarina", INST_TIED, MID, 'melo', 'winds', .06612, .19033, .01776 )
-_addInstrument( "rhodes", INST_TIED, MID, 'melo', 'keyboard', 0.58100625, 0.821625, 0.067 )
-_addInstrument( "saxo", INST_TIED, MID, 'melo', 'winds', .53722, .6583, .05264 )
-_addInstrument( "shenai", INST_TIED, MID, 'melo', 'winds', .29003, .33072, .00634 )
-_addInstrument( "sitar", INST_TIED, MID, 'melo', 'strings', .63187, .67882, .01654 )
-_addInstrument( "tuba", INST_TIED, LOW, 'melo', 'winds', .51063, .58384, .035 )
-_addInstrument( "violin", INST_TIED, MID, 'melo', 'strings', .105, .30656, .028 )
-_addInstrument( "guidice1", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice2", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice3", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice4", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice5", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice6", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice7", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice8", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice9", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guidice10", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "drum4afrofeet", INST_SIMP, LOW, 'drum', 'percussions', 0, 0 ,0 )
-_addInstrument( "drum4fingersn", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4mutecuic", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4stompbass", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tambouri", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr707clap", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr707open", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr808closed", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr808sn", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr909bass", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr909kick", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum4tr909sn", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5timablesslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5congagraveouvert", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5timablesaiguslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5congagraveferme", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5guiroretour", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5vibraslap", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5congaaiguouvert", INST_SIMP, MID, 'drum', 'percussions', 0, 0 ,0 )
-_addInstrument( "drum5quicamedium", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5quicaaigu", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5agogograve", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5bongoaiguouvert", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5agogoaigu", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "drum5bongograveouvert", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0 )
-_addInstrument( "camera", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "car", INST_TIED, MID, 'melo', 'concret', .67, 1.05761, .01 )
-_addInstrument( "cello", INST_TIED, MID, 'melo', 'strings', 0.4761, 0.92244375, 0.19125 )
-_addInstrument( "chimes", INST_TIED, MID, 'melo', 'percussions', .09, 2.97633, .01 )
-_addInstrument( "crash", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "guit2", INST_TIED, MID, 'melo', 'strings', .33, 1.1583, .02 )
-_addInstrument( "plane", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
-_addInstrument( "slap", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0 )
+_addInstrument( "mic1", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01, 1 )
+_addInstrument( "mic2", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01, 1 )
+_addInstrument( "mic3", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01, 1 )
+_addInstrument( "mic4", INST_TIED, MID, 'melo', 'mysounds', .01, 1.99, .01, 1 )
+_addInstrument( "lab1", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "lab2", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "lab3", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "lab4", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "lab5", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "lab6", INST_SIMP, MID, 'melo', 'mysounds', 0, 0, 0, 1 )
+_addInstrument( "ounk", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "gam", INST_TIED, HIGH, 'melo', 'percussions', .69388, .7536, .02922, 1 )
+_addInstrument( "guit", INST_TIED, MID, 'melo', 'strings', .08592, .75126, .33571, 1 )
+_addInstrument( "koto", INST_TIED, HIGH, 'melo', 'strings', .56523, .70075, .05954, 1 )
+_addInstrument( "clarinette", INST_TIED, MID, 'melo', 'winds', .57905, .73319, .04934, 1 )
+_addInstrument( "flute", INST_TIED, MID, 'melo', 'winds', .47169, .53693, .02481, 1 )
+_addInstrument( "drum1hatpedal", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1hatshoulder", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1hardride", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1ridebell", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1snare", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1snaresidestick", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1crash", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1splash", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1tom", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1floortom", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1)
+_addInstrument( "drum1chine", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum1kick", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "piano", INST_TIED, MID, 'melo', 'keyboard', 0.8883, 1.420524, .13575, 1 )
+_addInstrument( "dog", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "duck", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukadoom", INST_SIMP, LOW, 'drum', 'percussions', 0, 0 ,0, 1 )
+_addInstrument( "drum2darbukapied", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukapiedsoft", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2hatflanger", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukatak", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukafinger", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukaroll", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2darbukaslap", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2hatpied", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2tambourinepied", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2hatpied2", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum2tambourinepiedsoft", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3cowbell", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3cowbelltip", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1)
+_addInstrument( "drum3cup", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3djembelow", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3djembemid", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3djembesidestick", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3djembeslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3djembestickmid", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3metalstand", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3pedalperc", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3rainstick", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3tambourinehigh", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum3tambourinelow", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "harmonica", INST_TIED, MID, 'melo', 'winds', .1531, .19188, .01792, 1 )
+_addInstrument( "alarm", INST_TIED, MID, 'melo', 'concret', 1.37555859375, 2.0286015625, .0675, 1 )
+_addInstrument( "bird", INST_TIED, MID, 'melo', 'animals', .1, 1, .05, 1 )
+_addInstrument( "cat", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "duck2", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "bottle", INST_TIED, MID, 'melo', 'concret', .20532, .41064, .05292, 1 )
+_addInstrument( "clang", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "ow", INST_SIMP, MID, 'melo', 'people', 0, 0, 0, 1 )
+_addInstrument( "sheep", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "water", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "zap", INST_TIED, MID, 'melo', 'keyboard', .299, .7323, .09895, 1 )
+_addInstrument( "trumpet", INST_TIED, MID, 'melo', 'winds', .39934, .45537, .02729, 1)
+_addInstrument( "bubbles", INST_TIED, MID, "melo", 'concret', 0.02, 1.177, 0.02, 1)
+_addInstrument( "marimba", INST_TIED, MID, "melo", 'percussions', .26545, .33098, .03087, 1)
+_addInstrument( "triangle", INST_TIED, MID, "melo", 'percussions', 1.21002, 1.31805, .01268, 1)
+_addInstrument( "laugh", INST_SIMP, MID, 'melo', 'people', 0, 0, 0, 1 )
+_addInstrument( "voix", INST_TIED, MID, 'melo', 'people', .89608, .96092, .02343, 1 )
+_addInstrument( "cling", INST_TIED, MID, 'melo', 'keyboard', .09096, .7878, .18026, 1 )
+_addInstrument( "byke", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "door", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "basse", INST_TIED, MID, 'melo', 'strings', 0.50470875, 0.833315, 0.09375, 1 )
+_addInstrument( "acguit", INST_TIED, MID, 'melo', 'strings', 1.4037, 1.84235625, 0.2, 1 )
+_addInstrument( "diceinst", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "didjeridu", INST_TIED, LOW, 'melo', 'winds', .55669, 1.73704, .09178, 4. )
+_addInstrument( "harmonium", INST_TIED, MID, 'melo', 'keyboard', .04674, .41073, .18384, 1 )
+_addInstrument( "horse", INST_SIMP, MID, 'melo', 'animals', 0, 0, 0, 1 )
+_addInstrument( "kalimba", INST_TIED, MID, 'melo', 'percussions', .20751, .30161, .04658, 1 )
+_addInstrument( "mando", INST_TIED, MID, 'melo', 'strings', 0.316548, 0.532008, 0.02875, 1 )
+_addInstrument( "ocarina", INST_TIED, MID, 'melo', 'winds', .06612, .19033, .01776, 1 )
+_addInstrument( "rhodes", INST_TIED, MID, 'melo', 'keyboard', 0.58100625, 0.821625, 0.067, 1 )
+_addInstrument( "saxo", INST_TIED, MID, 'melo', 'winds', .53722, .6583, .05264, 1 )
+_addInstrument( "shenai", INST_TIED, MID, 'melo', 'winds', .29003, .33072, .00634, 1 )
+_addInstrument( "sitar", INST_TIED, MID, 'melo', 'strings', .63187, .67882, .01654, 1 )
+_addInstrument( "tuba", INST_TIED, LOW, 'melo', 'winds', .51063, .58384, .035, 1 )
+_addInstrument( "violin", INST_TIED, MID, 'melo', 'strings', .105, .30656, .028, 1 )
+_addInstrument( "guidice1", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice2", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice3", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice4", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice5", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice6", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice7", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice8", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice9", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice10", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "drum4afrofeet", INST_SIMP, LOW, 'drum', 'percussions', 0, 0 ,0, 1 )
+_addInstrument( "drum4fingersn", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4mutecuic", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4stompbass", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tambouri", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr707clap", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr707open", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr808closed", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr808sn", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr909bass", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr909kick", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum4tr909sn", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5timablesslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5congagraveouvert", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5timablesaiguslap", INST_SIMP, LOW, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5congagraveferme", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5guiroretour", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5vibraslap", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5congaaiguouvert", INST_SIMP, MID, 'drum', 'percussions', 0, 0 ,0, 1 )
+_addInstrument( "drum5quicamedium", INST_SIMP, PUNCH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5quicaaigu", INST_SIMP, MID, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5agogograve", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5bongoaiguouvert", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5agogoaigu", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "drum5bongograveouvert", INST_SIMP, HIGH, 'drum', 'percussions', 0, 0, 0, 1 )
+_addInstrument( "camera", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "car", INST_TIED, MID, 'melo', 'concret', .67, 1.05761, .01, 1 )
+_addInstrument( "cello", INST_TIED, MID, 'melo', 'strings', 0.4761, 0.92244375, 0.19125, .5 )
+_addInstrument( "chimes", INST_TIED, MID, 'melo', 'percussions', .09, 2.97633, .01, 1 )
+_addInstrument( "crash", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "guit2", INST_TIED, MID, 'melo', 'strings', .33, 1.1583, .02, 1 )
+_addInstrument( "plane", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
+_addInstrument( "slap", INST_SIMP, MID, 'melo', 'concret', 0, 0, 0, 1 )
try:
ifile = open(PREF_DIR + '/sounds_settings', 'r')
@@ -328,11 +329,11 @@ DRUM5KIT = { 24 : INSTRUMENTS["drum5timablesslap"],
46 : INSTRUMENTS["drum5agogograve"],
48 : INSTRUMENTS["drum5bongoaiguouvert"] }
-_addInstrument( "drum1kit", 0, 0, 0, "percussions", 0, 0, 0, DRUM1KIT )
-_addInstrument( "drum2kit", 0, 0, 0, "percussions", 0, 0, 0, DRUM2KIT )
-_addInstrument( "drum3kit", 0, 0, 0, "percussions", 0, 0, 0, DRUM3KIT )
-_addInstrument( "drum4kit", 0, 0, 0, "percussions", 0, 0, 0, DRUM4KIT )
-_addInstrument( "drum5kit", 0, 0, 0, "percussions", 0, 0, 0, DRUM5KIT )
+_addInstrument( "drum1kit", 0, 0, 0, "percussions", 0, 0, 0, 1, DRUM1KIT )
+_addInstrument( "drum2kit", 0, 0, 0, "percussions", 0, 0, 0, 1, DRUM2KIT )
+_addInstrument( "drum3kit", 0, 0, 0, "percussions", 0, 0, 0, 1, DRUM3KIT )
+_addInstrument( "drum4kit", 0, 0, 0, "percussions", 0, 0, 0, 1, DRUM4KIT )
+_addInstrument( "drum5kit", 0, 0, 0, "percussions", 0, 0, 0, 1, DRUM5KIT )
INSTRUMENTSID = {}
for i in INSTRUMENTS:
diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py
index bdd6e97..7a9e6e3 100644
--- a/common/Util/CSoundClient.py
+++ b/common/Util/CSoundClient.py
@@ -311,6 +311,9 @@ class _CSoundClientPlugin:
else:
instrument_id_offset = 100
+ amplitude = amplitude * instrument.ampScale
+ print "%f * %f = %f" % (amplitude, instrument.ampScale, amplitude * instrument.ampScale)
+ print "instrument %s final amplitude: %f" % (instrument.name, amplitude)
rval[0] = (instrument.csoundInstrumentId + \
(trackId+1) + instrument_id_offset) + trackId * 0.01
rval[1] = onset