summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Gourlay <john@weathervanefarm.net>2016-04-06 11:11:14 -0400
committerJohn Gourlay <john@weathervanefarm.net>2016-04-06 11:11:14 -0400
commit9b2a61fc68fbe88f71000d7cd7f2f474c047db30 (patch)
tree770d6ee4b40970c73fc33b4ccf0ece051c775e35 /scripts
parent1f6e0e7a473c909c5577cba57d93e5a1c6f9f975 (diff)
In scripts/musicxml2ly.py fix a bug that caused a dynamic on the last note
of a tuplet to be emitted after the tuplet's braces rather than within them.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/musicxml2ly.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py
index 172f1a8d3e..7c5297b5ff 100644
--- a/scripts/musicxml2ly.py
+++ b/scripts/musicxml2ly.py
@@ -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