]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Convert string information
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 29 Oct 2007 23:02:04 +0000 (00:02 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 29 Oct 2007 23:02:04 +0000 (00:02 +0100)
For tab staves and voices, we will need to convert the <string> number
to lilypond to lilypond's \1, ..., \6 commands. So far, the tab staff
is not yet created, so these commands do not have any effect yet, but
they will be needed in the near future.

scripts/musicxml2ly.py

index 3adc084450cdab93e5725074f31452157a223457..3c4cef063ebe26f44c5bfedd8fe2724a571d0573 100644 (file)
@@ -584,6 +584,11 @@ def musicxml_fingering_event (mxl_event):
     ev.type = mxl_event.get_text ()
     return ev
 
+def musicxml_string_event (mxl_event):
+    ev = musicexp.NoDirectionArticulationEvent ()
+    ev.type = mxl_event.get_text ()
+    return ev
+
 def musicxml_accidental_mark (mxl_event):
     ev = musicexp.MarkupEvent ()
     contents = { "sharp": "\\sharp",
@@ -647,7 +652,7 @@ articulations_dict = {
     "staccato": (musicexp.ShortArticulationEvent, "."),
     "stopped": (musicexp.ShortArticulationEvent, "+"),
     #"stress": "",
-    #"string": "",
+    "string": musicxml_string_event,
     "strong-accent": (musicexp.ShortArticulationEvent, "^"),
     #"tap": "",
     "tenuto": (musicexp.ShortArticulationEvent, "-"),