diff options
author | James <olpc@localhost.localdomain> | 2007-01-29 12:06:20 (GMT) |
---|---|---|
committer | James <olpc@localhost.localdomain> | 2007-01-29 12:06:20 (GMT) |
commit | 644bcc9367e73bbbe8cd6ddabd7381422a1711b3 (patch) | |
tree | 837e714b06263ad48d5c6535f90052cb78967b25 /Edit/TrackInterface.py | |
parent | 89c618caa4b03875c0bad23a29c07c052a84834c (diff) | |
parent | 7d6033f121af3eb5f6b5942c704a1893649171ee (diff) |
Merge branch 'master' of git+ssh://jaberg@dev.laptop.org/git/projects/tamtam
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 b51c093..a689dea 100644 --- a/Edit/TrackInterface.py +++ b/Edit/TrackInterface.py @@ -168,36 +168,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 @@ -213,8 +208,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 ): |