From cd62e6af4d8f4dda887f1aac15abb13128a7f447 Mon Sep 17 00:00:00 2001 From: Oli Date: Sat, 20 Oct 2007 17:25:17 +0000 Subject: removed csound table's load from startup --- (limited to 'TamTamEdit.activity/Edit/MainWindow.py') 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) -- cgit v0.9.1