Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-07-09 18:34:44 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-07-09 18:34:44 (GMT)
commitb7eddbc04ff7de917e5cad560abc219696bf6553 (patch)
tree2ef2c135f11610fef74eeda48f9123ff4833b33a /Edit
parent3b9dad1c7941ae8b56077c51e6d7a6a393b8c9cc (diff)
categorization of instruments for the default tune
Diffstat (limited to 'Edit')
-rw-r--r--Edit/MainWindow.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py
index fed0e57..29e1e86 100644
--- a/Edit/MainWindow.py
+++ b/Edit/MainWindow.py
@@ -59,16 +59,26 @@ class MainWindow( SubActivity ):
self._data['track_mute'] = [ 1.0 ] * Config.NUMBER_OF_TRACKS
#[ instrument index, ... ]
- instrumentsPickup = []
+ stringsPickup = []
+ windsPickup = []
+ keyboardPickup = []
+ fxPickup = []
drumsPickup = ["drum1kit", "drum2kit", "drum3kit", "drum4kit", "drum5kit"]
for name in Config.INSTRUMENTS.keys():
- if Config.INSTRUMENTS[name].soundClass == 'melo' and name[0:7] != 'guidice' and name[0:3] != 'mic' and name[0:3] != 'lab':
- instrumentsPickup.append(name)
+ if Config.INSTRUMENTS[name].category == 'strings':
+ stringsPickup.append(name)
+ elif Config.INSTRUMENTS[name].category == 'winds':
+ windsPickup.append(name)
+ elif Config.INSTRUMENTS[name].category == 'keyboard' or Config.INSTRUMENTS[name].category == 'people':
+ keyboardPickup.append(name)
+ elif Config.INSTRUMENTS[name].category == 'concret' or Config.INSTRUMENTS[name].category == 'electronic':
+ if name[0:7] != 'guidice':
+ fxPickup.append(name)
self.trackInstrumentDefault = [
- Config.INSTRUMENTS[random.choice(instrumentsPickup)],
- Config.INSTRUMENTS[random.choice(instrumentsPickup)],
- Config.INSTRUMENTS[random.choice(instrumentsPickup)],
- Config.INSTRUMENTS[random.choice(instrumentsPickup)],
+ Config.INSTRUMENTS[random.choice(stringsPickup)],
+ Config.INSTRUMENTS[random.choice(windsPickup)],
+ Config.INSTRUMENTS[random.choice(keyboardPickup)],
+ Config.INSTRUMENTS[random.choice(fxPickup)],
Config.INSTRUMENTS[random.choice(drumsPickup)] ]
self.trackInstrument = self.trackInstrumentDefault[:]
if len(self.trackInstrument) != Config.NUMBER_OF_TRACKS: raise 'error'