[MusicXML import] only four staves per part imported

• Mar 15, 2022 - 06:37
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

MusicXML import is limited to four staves per part, while MuseScore itself has no such limit. Staff 5 (and up) will be empty after import, console output shows one or more "MusicXMLParserPass1::determineStaffMoveVoice: too many voices" messages.

Root cause is the incorrect use of MAX_STAVES, which in the current MuseScore implementation affects instrument templates only, but is still used in the MusicXML importer.

Preferred solution is to replace all MAX_STAVES-sized arrays in the MusicXML importer by variable sized structures (e.g. std::vector).

See attached file, which imports with staff 5 empty.

Relates to #270643: [EPIC] MusicXML import/export issues

Attachment Size
FiveStaffPart.xml 3.73 KB