[MusicXML export] add text attribute to measure containing displayed measure number

• May 31, 2020 - 13:55
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Currently for scores containing section breaks (which reset displayed measure numbers), MuseScore's MusicXML export resets the measure's number attribute at the section break. As measure numbers are supposed to be unique within a part, this is strictly speaking incorrect. Up to and including MusicXML 3.0 no better solution was available to export measure numbers for multiple movements and our competition also does this. See #292461: [Musicxml Export] - Measure numbering not correct.

As of MusicXML 3.1, a proper solution is available: the measure's number attribute is a part-wide unique identification number (which does not reset at a section break), while the displayed measure number (which may reset at a section break) is in the text attribute.

Quoting the MusicMXL 3.1 schema (score.mod):
If measure numbers are not unique within a part, this can cause problems for conversions between partwise and timewise formats. The text attribute allows specification of displayed measure numbers that are different than what is used in the number attribute.

Example file with MusicXML export as is and to be is attached.

Attachment Size
sectionBreak.mscx 5.21 KB
sectionBreak_current.xml 2.79 KB
sectionBreak_to_be.xml 2.85 KB