[MusicXML import] fretboard frets property not saved in MuseScore format

• Apr 27, 2021 - 11:33
Reported version
3.6
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

The MusicXML frame-frets element gets imported correctly and stored in the fretboard's frets property, but not saved in MuseScore format. The cause is that the importer uses the setFrets() function instead of setting the property Pid::FRET_FRETS and its flags to PropertyFlags::UNSTYLED.

In the source code, change:

fd->setFrets(val);

into:

fd->setProperty(Pid::FRET_FRETS, val);
fd->setPropertyFlags(Pid::FRET_FRETS, PropertyFlags::UNSTYLED);

in function FretDiagram* MusicXMLParserPass2::frame().

E.g. testfile testChordDiagrams1.xml suffers from this.

Note that more properties may be affected by similar coding errors in the MusicXML importer, which should be checked and fixed.


Comments

Hmm, I see no different with or without that change.

testChordDiagrams1.xml uses <frame-frets>5</frame-frets> for both its fretboard diagrams, and that's the default anyhow.

But changing one of them to e.g. 3 and 3.5.2 shows it properly:
testChordDiagrams1-3.5.png
But 3.6.2 does not:
testChordDiagrams1-3.6.png
And with your proposed fix 3.x does indeed fix this:
testChordDiagrams1-3.x-fixed.png

Fix version
4.0.0