]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Only print tremolos once.
authorErlend Aasland <erlend.aasland@mac.com>
Mon, 4 Feb 2008 09:35:01 +0000 (10:35 +0100)
committerErlend Aasland <erlend.aasland@mac.com>
Mon, 4 Feb 2008 09:35:01 +0000 (10:35 +0100)
Also default to three tremolo marks if none is specified.

scripts/musicxml2ly.py

index bf41a467790d2764e0993e402158f0e32d191254..45e6334420d155d4fe18852e025ef34ff1e5b338 100644 (file)
@@ -767,16 +767,18 @@ def musicxml_fermata_to_lily_event (mxl_event):
         ev.force_direction = dir
     return ev
 
-
 def musicxml_arpeggiate_to_lily_event (mxl_event):
     ev = musicexp.ArpeggioEvent ()
     ev.direction = musicxml_direction_to_indicator (getattr (mxl_event, 'direction', None))
     return ev
 
-
 def musicxml_tremolo_to_lily_event (mxl_event):
     ev = musicexp.TremoloEvent ()
-    ev.bars = mxl_event.get_text ()
+    txt = mxl_event.get_text ()
+    if txt:
+       ev.bars = mxl_event.get_text ()
+    else:
+       ev.bars = "3"
     return ev
 
 def musicxml_bend_to_lily_event (mxl_event):
@@ -784,7 +786,6 @@ def musicxml_bend_to_lily_event (mxl_event):
     ev.alter = mxl_event.bend_alter ()
     return ev
 
-
 def musicxml_fingering_event (mxl_event):
     ev = musicexp.ShortArticulationEvent ()
     ev.type = mxl_event.get_text ()
@@ -1480,12 +1481,6 @@ def musicxml_voice_to_lily_voice (voice):
             #         shake | wavy-line | mordent | inverted-mordent | 
             #         schleifer | tremolo | other-ornament, accidental-mark
             ornaments = notations.get_named_children ('ornaments')
-            for a in ornaments:
-                for ch in a.get_named_children ('tremolo'):
-                    ev = musicxml_tremolo_to_lily_event (ch)
-                    if ev: 
-                        ev_chord.append (ev)
-
             ornaments += notations.get_named_children ('articulations')
             ornaments += notations.get_named_children ('technical')