MusicXML import: G-Clef 15ma bassa imports as G-Clef

• Jan 17, 2023 - 18:45
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

On a windows comp:

The treble clef 15ma bassa gets replaced with a normal treble clef when I export a score to .musicXML.
I have not checked what happens with other clefs.

Attachment Size
Capture.PNG 33.87 KB

Comments

OK, seems the problem is only with the G-Clef 15ma bassa, right?

Which is an unusual clef to use here, Contrabass are usually using an F-Cled or F-Clef 8va bassa and the the pedals of an organ are usually using an F-Clef 8va bassa

Fix seems realy easy:

$ git diff
diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp
index fbf8c1561f..a33aac1c40 100644
--- a/importexport/musicxml/importmxmlpass2.cpp
+++ b/importexport/musicxml/importmxmlpass2.cpp
@@ -4794,6 +4794,8 @@ void MusicXMLParserPass2::clef(const QString& partId, Measure* measure, const Fr
             clef = ClefType::G15_MA;
       else if (c == "G" && i == -1 && line == 2)
             clef = ClefType::G8_VB;
+      else if (c == "G" && i == -2 && line == 2)
+            clef = ClefType::G15_MB;
       else if (c == "G" && i == 0 && line == 1)
             clef = ClefType::G_1;
       else if (c == "F" && i == 0 && line == 3)
Title Wrong clef(s) in musicXML files, G-Clef 15ma bassa get imported as a normal G-Clef MusicXML import: G-Clef 15ma bassa imports as G-Clef

That is for import, are you saying the issue is (also) with export? How then did you create that musicxml file?
Apparently with MuseScore 4.0.1, but hand-edited after that?

Fix version
4.1.0