From: Reinhold Kainhofer Date: Sun, 23 Dec 2007 22:19:50 +0000 (+0100) Subject: MusicXML: Don't crash on multiple triplet children X-Git-Tag: release/2.11.37-1~20^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c0327df093131ab50da266a857d7af81d6c5c389;p=lilypond.git MusicXML: Don't crash on multiple triplet children Finale seems to produce xml files that contain tags with possibly multiple tags, in particular when a tuplet is only for one note (with tremolo subdivisions)... This patch only fixes the crash, but does not handle the logic behind this correctly :-( --- diff --git a/python/musicxml.py b/python/musicxml.py index 6949fe28d5..63296f193e 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -700,8 +700,8 @@ class Notations (Music_xml_node): else: return None - def get_tuplet (self): - return self.get_maybe_exist_typed_child (Tuplet) + def get_tuplets (self): + return self.get_typed_children (Tuplet) class Time_modification(Music_xml_node): def get_fraction (self): diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 43dc29f7cb..5884f536b9 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1404,8 +1404,7 @@ def musicxml_voice_to_lily_voice (voice): # +fermata | arpeggiate | non-arpeggiate | # accidental-mark | other-notation for notations in notations_children: - if notations.get_tuplet(): - tuplet_event = notations.get_tuplet() + for tuplet_event in notations.get_tuplets(): mod = n.get_maybe_exist_typed_child (musicxml.Time_modification) frac = (1,1) if mod: