From fac17bce3605f3a064b829f88e1214fe90588178 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Sat, 4 Apr 2009 15:14:50 +0200 Subject: [PATCH] MusicXML: Add exceptions for more broken MusicXML exporters Most old Dolet for Sibelius plugins wrote broken beaming information. Ignore them all! --- scripts/musicxml2ly.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 561d4cd5da..5a8896c1b0 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -307,18 +307,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: -- 2.39.5