diff options
author | Oli <olivier.belanger@umontreal.ca> | 2007-10-20 17:25:17 (GMT) |
---|---|---|
committer | Oli <olivier.belanger@umontreal.ca> | 2007-10-20 17:25:17 (GMT) |
commit | cd62e6af4d8f4dda887f1aac15abb13128a7f447 (patch) | |
tree | 13fc523fa1f9d1555c7d235e3bf6c5a8bcfbaf25 /TamTamEdit.activity/Edit | |
parent | 138653b35fe9ed1ccc651fd988fac4b14e83f71a (diff) |
removed csound table's load from startup
Diffstat (limited to 'TamTamEdit.activity/Edit')
-rw-r--r-- | TamTamEdit.activity/Edit/MainWindow.py | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/TamTamEdit.activity/Edit/MainWindow.py b/TamTamEdit.activity/Edit/MainWindow.py index 772257e..73f52a4 100644 --- a/TamTamEdit.activity/Edit/MainWindow.py +++ b/TamTamEdit.activity/Edit/MainWindow.py @@ -58,8 +58,7 @@ class MainWindow( gtk.EventBox ): self.scale = GenerationConstants.DEFAULT_SCALE # META ALGO: [section, variation or not, nPages] A B A C - # TODO: Different parameters sets for each tracks - self.tuneForm = [[0, False, 4], [1, False, 4], [0, True, 2], [2, False, 2]] + self.tuneForm = [[0, False, 2], [1, False, 4], [0, True, 2], [2, False, 2]] def init_data( ): TP.ProfileBegin("init_data") @@ -77,6 +76,13 @@ class MainWindow( gtk.EventBox ): self.instrumentDB.instNamed["kalimba"], self.instrumentDB.instNamed["drum2kit"] ] self.trackInstrument = self.trackInstrumentDefault[:] + + for i in self.trackInstrument: + if i.kit == None: + self.csnd.load_instrument(i.name) + else: + self.csnd.load_drumkit(i.name) + if len(self.trackInstrument) != Config.NUMBER_OF_TRACKS: raise 'error' self.drumIndex = Config.NUMBER_OF_TRACKS - 1 @@ -413,6 +419,12 @@ class MainWindow( gtk.EventBox ): orch = self.newOrchestra() + for i in orch: + if i.kit == None: + self.csnd.load_instrument(i.name) + else: + self.csnd.load_drumkit(i.name) + instrumentsIds = [] for inst in orch: instrumentsIds.append(inst.instrumentId) @@ -797,6 +809,10 @@ class MainWindow( gtk.EventBox ): else: self.trackInstrument2[id] = instrument + if instrument.kit == None: + self.csnd.load_instrument(instrument.name) + else: + self.csnd.load_drumkit(instrument.name) if primary: # TODO handle secondary instruments properly if (Config.DEBUG > 3): print "handleInstrumentChanged", id, instrument.name, primary @@ -2160,8 +2176,9 @@ class instrumentPalette( Popup ): def handleInstrumentChange(self, widget): if not self.skip: instrument = widget.props.value - self.edit.playInstrumentNote(instrument) self.edit.donePickInstrument(instrument) + time.sleep(0.05) + self.edit.playInstrumentNote(instrument) self.popdown(True) def handleCategoryChange(self, widget): @@ -2263,8 +2280,9 @@ class drumPalette( Popup ): def handleInstrumentChange(self, widget): if not self.skip: drum = widget.props.value - self.edit.playInstrumentNote(drum) self.edit.donePickDrum(drum) + time.sleep(0.05) + self.edit.playInstrumentNote(drum) self.popdown(True) |