]> git.donarmstrong.com Git - lilypond.git/commitdiff
Midi2ly: reset octave for each voice. Fixes #1533.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 21 Feb 2011 20:26:47 +0000 (21:26 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 21 Feb 2011 20:26:47 +0000 (21:26 +0100)
scripts/midi2ly.py

index b233d98a7581ac2ed2a2ab67a7c03369b6e46486..01f836ea36e8b0c981cd1c9b0f7f245041a974d4 100644 (file)
@@ -666,8 +666,12 @@ def dump_voice (thread, skip):
     # urg LilyPond doesn't start at c4, but
     # remembers from previous tracks!
     # reference_note = Note (clocks_per_4, 4*12, 0)
+    ref = Note (0, 4*12, 0)
     if not reference_note:
-        reference_note = Note (0, 4*12, 0)
+        reference_note = ref
+    else:
+        ref.duration = reference_note.duration
+        reference_note = ref
     last_e = None
     chs = []
     ch = []