From: Reinhold Kainhofer Date: Mon, 4 Feb 2008 16:23:01 +0000 (+0100) Subject: MusicXML: Support for angled/square fermatas and inverted fermatas X-Git-Tag: release/2.11.39-1~1^2~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5e2f4f70fae6951e3f1067b1ef493d233c5c4fb1;p=lilypond.git MusicXML: Support for angled/square fermatas and inverted fermatas Signed-off-by: Reinhold Kainhofer --- diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 4195de8f93..6d77d04392 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -756,11 +756,13 @@ def musicxml_spanner_to_lily_event (mxl_event): return ev def musicxml_direction_to_indicator (direction): - return { "above": 1, "upright": 1, "up":1, "below": -1, "downright": -1, "down": -1 }.get (direction, 0) + return { "above": 1, "upright": 1, "up":1, "below": -1, "downright": -1, "down": -1, "inverted": -1 }.get (direction, 0) def musicxml_fermata_to_lily_event (mxl_event): ev = musicexp.ArticulationEvent () - ev.type = "fermata" + txt = mxl_event.get_text () + # The contents of the element defined the shape, possible are normal, angled and square + ev.type = { "angled": "shortfermata", "square": "longfermata" }.get (txt, "fermata") if hasattr (mxl_event, 'type'): dir = musicxml_direction_to_indicator (mxl_event.type) if dir and options.convert_directions: @@ -776,9 +778,9 @@ def musicxml_tremolo_to_lily_event (mxl_event): ev = musicexp.TremoloEvent () txt = mxl_event.get_text () if txt: - ev.bars = mxl_event.get_text () + ev.bars = txt else: - ev.bars = "3" + ev.bars = "3" return ev def musicxml_falloff_to_lily_event (mxl_event):