diff options
author | amartin <olpc@localhost.localdomain> | 2007-01-29 17:54:41 (GMT) |
---|---|---|
committer | amartin <olpc@localhost.localdomain> | 2007-01-29 17:54:41 (GMT) |
commit | 8f6117e6876047931a035d3058a5b725a720c318 (patch) | |
tree | 4a134f942a799dd2a8c52b890358b652cc52cc10 /Edit/TrackInterface.py | |
parent | ea065354331994c37bc0c3b71e526e10e97750bb (diff) | |
parent | 5a51e4b1b1345361bccd8338b800a3b591a28d91 (diff) |
Merge branch 'master' of git+ssh://amartin@dev.laptop.org/git/projects/tamtam
Conflicts:
Edit/MainWindow.py
Diffstat (limited to 'Edit/TrackInterface.py')
-rw-r--r-- | Edit/TrackInterface.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/Edit/TrackInterface.py b/Edit/TrackInterface.py index c47af40..da205f4 100644 --- a/Edit/TrackInterface.py +++ b/Edit/TrackInterface.py @@ -169,36 +169,31 @@ class TrackInterface( gtk.EventBox ): t = noteParams["track"][i] if p not in at: at[p] = [0] * Config.NUMBER_OF_TRACKS - #at[p] = [] - #for j in range(Config.NUMBER_OF_TRACKS): at[p].append(0) if p not in self.note: self.note[p] = map(lambda x:[], range(Config.NUMBER_OF_TRACKS)) - #self.note[p] = [] - #for j in range(Config.NUMBER_OF_TRACKS): - #self.note[p].append( [] ) self.pageBeatCount[p] = noteParams["beatCount"][i] self.pageNoteCount[p] = 0 csnote = noteParams["csnote"][i] if noteParams["track"][i] == self.drumIndex: note = HitInterface( self, p, noteParams["track"][i], noteParams["note"][i], \ - csnote["pitch"], csnote["onset"], csnote["duration"], csnote["amplitude"], \ + csnote.pitch, csnote.onset, csnote.duration, csnote.amplitude, \ self.image["hit"], self.image["hitSelected"], self.trackColors[noteParams["track"][i]] ) else: note = NoteInterface( self, p, noteParams["track"][i], noteParams["note"][i], \ - csnote["pitch"], csnote["onset"], csnote["duration"], csnote["amplitude"], \ + csnote.pitch, csnote.onset, csnote.duration, csnote.amplitude, \ self.image["note"], self.image["noteSelected"], self.trackColors[noteParams["track"][i]] ) while at[p][t] > 0: startT = self.note[p][t][at[p][t]-1].getStartTick() - if startT <= csnote["onset"]: - if startT < csnote["onset"]: break - elif self.note[p][t][at[p][t]-1].getPitch <= csnote["pitch"]: break + if startT <= csnote.onset: + if startT < csnote.onset: break + elif self.note[p][t][at[p][t]-1].getPitch <= csnote.pitch: break at[p][t] -= 1 last = len(self.note[p][t]) while at[p][t] < last: startT = self.note[p][t][at[p][t]].getStartTick() - if startT >= csnote["onset"]: - if startT > csnote["onset"]: break - elif self.note[p][t][at[p][t]].getPitch >= csnote["pitch"]: break + if startT >= csnote.onset: + if startT > csnote.onset: break + elif self.note[p][t][at[p][t]].getPitch >= csnote.pitch: break at[p][t] += 1 self.note[p][t].insert( at[p][t], note ) self.pageNoteCount[p] += 1 @@ -214,8 +209,8 @@ class TrackInterface( gtk.EventBox ): t = noteParams["track"][i] id = noteParams["note"] csnote = noteParams["csnote"] - self.resortNote( p, t, id, csnote["pitch"], csnote["onset"] ) - self.note[p][t][self.noteMap[p][id]].updateParams( csnote["pitch"], csnote["onset"], csnote["duration"], csnote["amplitude"] ) + self.resortNote( p, t, id, csnote.pitch, csnote.onset ) + self.note[p][t][self.noteMap[p][id]].updateParams( csnote.pitch, csnote.onset, csnote.duration, csnote.amplitude ) # noteParams: { "page":pagelist, "track":tracklist, "note":noteIDlist } def deleteNotes( self, noteParams, noteCount ): |