]> git.donarmstrong.com Git - lilypond.git/commitdiff
In scripts/musicxml2ly.py fix a bug that caused a dynamic on the last note
authorJohn Gourlay <john@weathervanefarm.net>
Wed, 6 Apr 2016 15:11:14 +0000 (11:11 -0400)
committerJohn Gourlay <john@weathervanefarm.net>
Wed, 6 Apr 2016 15:11:14 +0000 (11:11 -0400)
of a tuplet to be emitted after the tuplet's braces rather than within them.

scripts/musicxml2ly.py

index 172f1a8d3e44b5e36bd07141c6e7db899f9052d4..7c5297b5ffb51e01211590995292ce7300733b8e 100644 (file)
@@ -762,6 +762,14 @@ def group_tuplets(music_list, events):
         new_list.extend(music_list[last:i1])
         seq = musicexp.SequentialMusic()
         last = i2 + 1
+
+        # At this point music_list[i1:last] encompasses all the notes of the
+        # tuplet. There might be dynamics following this range, however, which
+        # apply to the last note of the tuplet. Advance last to include them
+        # in the range.
+        while last < len(music_list) and isinstance(music_list[last], musicexp.DynamicsEvent):
+            last += 1
+
         seq.elements = music_list[i1:last]
 
         tsm.element = seq