]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Add basic support for caesura.
authorErlend Aasland <erlend.aasland@mac.com>
Mon, 4 Feb 2008 10:30:00 +0000 (11:30 +0100)
committerErlend Aasland <erlend.aasland@mac.com>
Mon, 4 Feb 2008 10:30:00 +0000 (11:30 +0100)
scripts/musicxml2ly.py

index c04101870c6459a33f9a61ad89db6bb3efd93811..4195de8f930bfbda0c572a43c3cce6f1efe1c985 100644 (file)
@@ -796,6 +796,13 @@ def musicxml_bend_to_lily_event (mxl_event):
     ev.alter = mxl_event.bend_alter ()
     return ev
 
+def musicxml_caesura_to_lily_event (mxl_event):
+    ev = musicexp.MarkupEvent ()
+    # FIXME: default to straight or curved caesura?
+    ev.contents = "\\musicglyph #\"scripts.caesura.straight\""
+    ev.force_direction = 1
+    return ev
+
 def musicxml_fingering_event (mxl_event):
     ev = musicexp.ShortArticulationEvent ()
     ev.type = mxl_event.get_text ()
@@ -845,7 +852,7 @@ articulations_dict = {
     "accidental-mark": musicxml_accidental_mark,
     "bend": musicxml_bend_to_lily_event,
     "breath-mark": (musicexp.NoDirectionArticulationEvent, "breathe"),
-    #"caesura": "caesura",
+    "caesura": musicxml_caesura_to_lily_event,
     #"delayed-turn": "?",
     "detached-legato": (musicexp.ShortArticulationEvent, "_"), # or "portato"
     "doit": musicxml_doit_to_lily_event,