[MusicXML Export] invalid MusicXML when instruments are missing from drumset
When a score contains percussion notes that do not have an instrument defined in the drum set, the MusicXML file exported is invalid. When importing this file, schema validation fails with a message such as "There is one IDREF value with no corresponding ID: P1-I81.". Cause is that MuseScore generates score-instrument and midi-instrument elements only for the instruments defined in the drum set.
Reproduce by creating a percussion score and remove any instrument actually used by editing the drum set.
File dusk.mscx in [#09331] also shows this problem.
Easiest solution is probably to generate (nameless) score-instrument and midi-instrument elements for these instruments.
Sample file attached that illustrates the issue.
Attachment | Size |
---|---|
DrumsetMissingInstrument.mscz | 1.53 KB |
DrumsetMissingInstrument.xml | 2.21 KB |
Comments
MuseScore 1.3 import it perfectly (with the drumset option unchecked on the mixer). I think this is another issue related with:
#17348: Remove drumset from Mixer
Pull request 2471.
Fixed in branch master, commit b397e8147c
fix #25982 - invalid MusicXML when instruments are missing from drumset
Fixed in branch 2.0.3, commit dc8fa78f4a
fix #25982 - invalid MusicXML when instruments are missing from drumset
Automatically closed -- issue fixed for 2 weeks with no activity.