]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/musicxml2ly.py
Add support for texidocs in check-translation
[lilypond.git] / scripts / musicxml2ly.py
index 06e7cb7542a5b9482e495a4d20016b4a0855f77e..19899b185c3c92c0a0a065a6d51bb677009503ed 100644 (file)
@@ -341,6 +341,10 @@ def extract_score_information (tree):
         if "Dolet 3.4 for Sibelius" in software:
             conversion_settings.ignore_beaming = True
             progress (_ ("Encountered file created by Dolet 3.4 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
+        # ditto for Dolet 3.5
+        if "Dolet 3.5 for Sibelius" in software:
+            conversion_settings.ignore_beaming = True
+            progress (_ ("Encountered file created by Dolet 3.5 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
         if "Noteworthy Composer" in software:
             conversion_settings.ignore_beaming = True
             progress (_ ("Encountered file created by Noteworthy Composer's nwc2xml, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
@@ -1658,6 +1662,7 @@ chordkind_dict = {
     'diminished': 'dim5',
         # Sevenths:
     'dominant': '7',
+    'dominant-seventh': '7',
     'major-seventh': 'maj7',
     'minor-seventh': 'm7',
     'diminished-seventh': 'dim7',
@@ -1837,8 +1842,9 @@ def musicxml_note_to_lily_main_event (n):
         # treated like an ordinary note pitch
         rest = n.get_maybe_exist_typed_child (musicxml.Rest)
         event = musicexp.RestEvent ()
-        pitch = musicxml_restdisplay_to_lily (rest)
-        event.pitch = pitch
+        if options.convert_rest_positions:
+            pitch = musicxml_restdisplay_to_lily (rest)
+            event.pitch = pitch
 
     elif n.instrument_name:
         event = musicexp.NoteEvent ()
@@ -2313,8 +2319,7 @@ def musicxml_voice_to_lily_voice (voice):
                 if len (endslurs) > 1:
                     endslurs[0].message (_ ('Cannot have two simultaneous (closing) slurs'))
                 # record the slur status for the next note in the loop
-                if not grace:
-                    inside_slur = False
+                inside_slur = False
                 lily_ev = musicxml_spanner_to_lily_event (endslurs[0])
                 ev_chord.append (lily_ev)
 
@@ -2326,8 +2331,7 @@ def musicxml_voice_to_lily_voice (voice):
                 if len (startslurs) > 1:
                     startslurs[0].message (_ ('Cannot have two simultaneous slurs'))
                 # record the slur status for the next note in the loop
-                if not grace:
-                    inside_slur = True
+                inside_slur = True
                 lily_ev = musicxml_spanner_to_lily_event (startslurs[0])
                 ev_chord.append (lily_ev)
 
@@ -2628,6 +2632,12 @@ information.""") % 'lilypond')
                   dest = "convert_directions",
                   help = _ ("do not convert directions (^, _ or -) for articulations, dynamics, etc."))
 
+    p.add_option ('--nrp', '--no-rest-positions', 
+                  action = "store_false",
+                  default = True,
+                  dest = "convert_rest_positions",
+                  help = _ ("do not convert exact vertical positions of rests"))
+
     p.add_option ('--no-beaming', 
                   action = "store_false",
                   default = True,