Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/NoteDB.py
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-08-17 19:20:48 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-08-17 19:20:48 (GMT)
commitac428f50a0cbcd05c5b76163ec095544888988fc (patch)
tree33d7564d421abf084fe0bd793dfe4a1f149680c2 /Util/NoteDB.py
parentf84efd464ad797f5f03aeb18105fc5378706495f (diff)
second inst uses good loop points, remove second inst works
Diffstat (limited to 'Util/NoteDB.py')
-rw-r--r--Util/NoteDB.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Util/NoteDB.py b/Util/NoteDB.py
index d334670..2cdf9c9 100644
--- a/Util/NoteDB.py
+++ b/Util/NoteDB.py
@@ -323,6 +323,19 @@ class NoteDB:
if len(stream):
self.updateNotes( stream + [-1] )
+ def setInstrument2( self, pages, track, instrumentId ):
+ stream = []
+ for page in pages:
+ #self.pages[page].instruments[track] = instrumentId
+ notes = self.getNotesByTrack( page, track )
+ sub = []
+ for note in notes:
+ sub.append( note.id )
+ sub.append( instrumentId )
+ if len(sub):
+ stream += [ page, track, PARAMETER.INSTRUMENT2, len(sub)//2 ] + sub
+ if len(stream):
+ self.updateNotes( stream + [-1] )
#=======================================================
# Note Functions