X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fmusicxml2ly.py;h=e835d68753e86a47d15da433b7a3bc0a0f359582;hb=c1aeb638eb777b641e5de7ca775ae3b497f91bc0;hp=886479a8936cfaaaa08f2117e2e6c177fcb7e037;hpb=20b8c1519bbba8728457aa98e59993837bedfb04;p=lilypond.git diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 886479a893..e835d68753 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1157,6 +1157,21 @@ def musicxml_rehearsal_to_ly_mark (mxl_event): ev = musicexp.MarkEvent ("\\markup { %s }" % text) return ev +def musicxml_harp_pedals_to_ly (mxl_event): + count = 0 + result = "\\harp-pedal #\"" + for t in mxl_event.get_named_children ('pedal-tuning'): + alter = t.get_named_child ('pedal-alter') + if alter: + val = int (alter.get_text ().strip ()) + result += {1: "v", 0: "-", -1: "^"}.get (val, "") + count += 1 + if count == 3: + result += "|" + ev = musicexp.MarkupEvent () + ev.contents = result + "\"" + return ev + def musicxml_eyeglasses_to_ly (mxl_event): needed_additional_definitions.append ("eyeglasses") return musicexp.MarkEvent ("\\eyeglasses") @@ -1222,7 +1237,7 @@ directions_dict = { # 'damp' : ??? # 'damp-all' : ??? 'eyeglasses': musicxml_eyeglasses_to_ly, -# 'harp-pedals' : ??? + 'harp-pedals' : musicxml_harp_pedals_to_ly, # 'image' : ??? 'metronome' : musicxml_metronome_to_ly, 'rehearsal' : musicxml_rehearsal_to_ly_mark,