Clef change export/import in MusicXML switches side of barline
When saving clef changes to a MusicXML file export, and then reloading the same MusicXML file back into MuseScore, the clef change is incorrectly displayed after the barline.
When creating a clef change initially in MuseScore, the position is correct:
The clef change for the second measure was created by dragging the bass clef from the palette into the second measure. This caused the clef to be displayed at the end of the previous measure (as is conventional and expected).
When exporting the file as MusicXML and reloading the same file back into MuseScore, the clef change moves from before the barline to after it:
Loading the same MusicXML file created with MuseScore into Finale 25.2, the clef position is correctly placed before the barline (even though the clef change is placed in the second measure in the MusicXML data).
Saving the same data to a MusicXML file in Finale will place the clef in the second measure as well, so the problem is that when reading a MusicXML file, MuseScore should display clef changes properly at the end of the previous measure when they are stored at the start of a measure.
When saving and reloading a MSCZ file, the clef position remains correct on reload.
Attachment | Size |
---|---|
oneclef-finale.xml | 7.31 KB |
oneclef.xml | 6.07 KB |
oneclef.mscz | 4.26 KB |
Comments
relates to #270643: [EPIC] MusicXML import/export issues
This issue seems to relate to the attribute
after-barline
(yes/no) that should be exported if the clef in the beginning of a measure should really appear there (after the barline), rather than at the end of the previous measure (before barline).To solve this issue, it seems to be necessary:
1) to add to the MusicXML export
after-barline="yes"
in (the rarer) cases of clefs appearing at the very beginning of a measure.2) to add support for importing this attribute correctly from MusicXML (thus with
after-barline="no"
or as a default behavior putting it before the barline; withafter-barline="yes"
after the barline).See PR: https://github.com/musescore/MuseScore/pull/7041
Fixed in branch 3.x, commit 237d6a5b76
fix #229546 [MusicXML] Clef change export/import in MusicXML switches side of barline
Automatically closed -- issue fixed for 2 weeks with no activity.