diff options
author | amartin <olpc@xo-05-28-21.localdomain> | 2007-08-27 07:41:25 (GMT) |
---|---|---|
committer | amartin <olpc@xo-05-28-21.localdomain> | 2007-08-27 07:41:25 (GMT) |
commit | 7eb4faf55a3935217f24bff9fd1f1ff2618c93ec (patch) | |
tree | 83e6983b075f68f10caefbef64fd4be42f059ecf /Util | |
parent | 42ca65d2e583639cdbb0a6af921ddf2dae75af54 (diff) |
Jam Loops
Diffstat (limited to 'Util')
-rw-r--r-- | Util/ControlStream.py | 5 | ||||
-rw-r--r-- | Util/InstrumentDB.py | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Util/ControlStream.py b/Util/ControlStream.py index a6af1d9..9b36bba 100644 --- a/Util/ControlStream.py +++ b/Util/ControlStream.py @@ -127,7 +127,10 @@ class TamTamTable: insts += str print pid, insts instruments = eval( insts ) - after = self.noteDB.tune[-1] + if len( self.noteDB.tune ): + after = self.noteDB.tune[-1] + else: + after = False self.pid[pid] = self.noteDB.addPage(-1, NoteDB.Page(beats,color,instruments), after) def page_set(self, argv): diff --git a/Util/InstrumentDB.py b/Util/InstrumentDB.py index b88a77a..ca1e0ef 100644 --- a/Util/InstrumentDB.py +++ b/Util/InstrumentDB.py @@ -43,7 +43,7 @@ class InstrumentDB: # initialize an empty InstrumentDB instance def __init__(self): - self.labelSet = {'all':set([])} # <key> -> all instruments labelled by <key> + self.labelSet = {'All':set([])} # <key> -> all instruments labelled by <key> self.inst = [] # all instruments self.instNamed = {} # <name> -> instrument with that name self.kit = [] # all kits. kits are lists of 13 instruments @@ -56,7 +56,7 @@ class InstrumentDB: self.inst += [ i ] i.loadFromArgs( name, csoundInstrumentName, register, loopStart, loopEnd, crossDur, wav, img, labels ) #print 'labelSet... ', self.labelSet - self.labelSet['all'].add(i) + self.labelSet['All'].add(i) for l in i.labels: if l not in self.labelSet: self.labelSet[l] = set([]) @@ -70,7 +70,7 @@ class InstrumentDB: i.loadFromPath( path ) self.instNamed[ i.name ] = i #print 'labelSet... ', self.labelSet - self.labelSet['all'].add(i) + self.labelSet['All'].add(i) for l in i.labels: if l not in self.labelSet: self.labelSet[l] = set([]) |