]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Add exceptions for more broken MusicXML exporters
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 4 Apr 2009 13:14:50 +0000 (15:14 +0200)
committerNeil Puttock <n.puttock@gmail.com>
Sun, 19 Jul 2009 23:37:29 +0000 (00:37 +0100)
Most old Dolet for Sibelius plugins wrote broken beaming information.
Ignore them all!
(cherry picked from commit 07e11fe998c868834d99cc453d88de2e121dcead)

scripts/musicxml2ly.py

index 19899b185c3c92c0a0a065a6d51bb677009503ed..b6eef3a7f5dde061487f9bf7a22d43eed405c499 100644 (file)
@@ -338,18 +338,22 @@ def extract_score_information (tree):
 
         # Case 1: "Sibelius 5.1" with the "Dolet 3.4 for Sibelius" plugin
         #         is missing all beam ends => ignore all beaming information
-        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"))
-        # TODO: Check for other unsupported features
-
+        ignore_beaming_software = {
+            "Dolet 3.5 for Sibelius": "Dolet 3.5 for Sibelius",
+            "Dolet 3.4 for Sibelius": "Dolet 3.4 for Sibelius",
+            "Dolet 3.3 for Sibelius": "Dolet 3.3 for Sibelius",
+            "Dolet 3.2 for Sibelius": "Dolet 3.2 for Sibelius",
+            "Dolet 3.1 for Sibelius": "Dolet 3.1 for Sibelius",
+            "Dolet for Sibelius 1.3": "Dolet for Sibelius 1.3",
+            "Noteworthy Composer": "Noteworthy Composer's nwc2xm[",
+        }
+        for s in software:
+            app_description = ignore_beaming_software.get (s, False);
+            if app_description:
+                conversion_settings.ignore_beaming = True
+                progress (_ ("Encountered file created by %s, containing wrong beaming information. All beaming information in the MusicXML file will be ignored") % app_description)
+
+    # TODO: Check for other unsupported features
     return header
 
 class PartGroupInfo: