From: Reinhold Kainhofer Date: Tue, 30 Oct 2007 16:58:16 +0000 (+0100) Subject: MusicXML: Don't crash when a note has multiple children X-Git-Tag: release/2.11.35-1~55^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=763eb543a5a5ba769379e65291a4ab0c6d9db2e8;p=lilypond.git MusicXML: Don't crash when a note has multiple children --- diff --git a/input/regression/musicxml/02h-MultipleNotationChildren-RFK.xml b/input/regression/musicxml/02h-MultipleNotationChildren-RFK.xml new file mode 100644 index 0000000000..ae2a60cf67 --- /dev/null +++ b/input/regression/musicxml/02h-MultipleNotationChildren-RFK.xml @@ -0,0 +1,101 @@ + + + + Multiple notation and articulation children + + Public Domain + + Hand-crafted MusicXML + + + + It should not make any difference whether two articulations are given + inside to different notation elements, inside two different articulations + children of the same notation element or inside the same articulations + element. Thus, all three notes should have a staccato and an accent. + + + + + + MusicXML Part + + + + + + + 4 + + G + 2 + + + 0 + + + + + + A + 4 + + 4 + 1 + quarter + sharp + down + + + + + + + + + + + + + + A + 4 + + 4 + 1 + quarter + sharp + down + + + + + + + + + + + + A + 4 + + 4 + 1 + quarter + sharp + down + + + + + + + + + + diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 3adc084450..d9ebfc3ff6 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1157,7 +1157,7 @@ def musicxml_voice_to_lily_voice (voice): if voice_builder.current_duration () == 0 and n._duration > 0: voice_builder.set_duration (n._duration) - notations = n.get_maybe_exist_typed_child (musicxml.Notations) + notations_children = n.get_typed_children (musicxml.Notations) tuplet_event = None span_events = [] @@ -1166,7 +1166,7 @@ def musicxml_voice_to_lily_voice (voice): # ornaments | technical | articulations | dynamics | # +fermata | arpeggiate | non-arpeggiate | # accidental-mark | other-notation - if notations: + for notations in notations_children: if notations.get_tuplet(): tuplet_event = notations.get_tuplet() mod = n.get_maybe_exist_typed_child (musicxml.Time_modification)