]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/musicxml2ly.py
Merge branch 'lilypond/translation'
[lilypond.git] / scripts / musicxml2ly.py
index e594aa7d47bbd6dbfdaacff8b7047c9bef0c0fe9..a429b752510dbcb104937f080be03548f4493572 100644 (file)
@@ -727,15 +727,10 @@ def musicxml_barline_to_lily (barline):
 
     return retval.values ()
 
-# Brackets need a special engraver added the Staff context!
-def musicxml_bracket_to_ly ():
-    layout_information.set_context_item ('Staff', '\consists "Horizontal_bracket_engraver"  % for \\startGroup and \\stopGroup brackets')
-    return musicexp.BracketSpannerEvent ()
-
 spanner_event_dict = {
     'beam' : musicexp.BeamEvent,
     'dashes' : musicexp.TextSpannerEvent,
-    'bracket' : musicxml_bracket_to_ly,
+    'bracket' : musicexp.BracketSpannerEvent,
     'glissando' : musicexp.GlissandoEvent,
     'octave-shift' : musicexp.OctaveShiftEvent,
     'pedal' : musicexp.PedalEvent,
@@ -1386,6 +1381,7 @@ class LilyPondVoiceBuilder:
                 else:
                     duration_factor = Rational (diff.numerator ())
             else:
+                # for skips of a whole or more, simply use s1*factor
                 duration_log = 0
                 duration_factor = diff
             skip.duration.duration_log = duration_log
@@ -1652,7 +1648,13 @@ def musicxml_voice_to_lily_voice (voice):
                 ev = musicxml_spanner_to_lily_event (a)
                 if ev:
                     ev_chord.append (ev)
-                
+
+            # accidental-marks are direct children of <notation>!
+            for a in notations.get_named_children ('accidental-mark'):
+                ev = musicxml_articulation_to_lily_event (a)
+                if ev:
+                    ev_chord.append (ev)
+
             # Articulations can contain the following child elements:
             #         accent | strong-accent | staccato | tenuto |
             #         detached-legato | staccatissimo | spiccato |