MSCX format: rename <instrumentID> to <MusicXMLid>

• Jun 30, 2021 - 22:49
Reported version
4.x-dev
Priority
P3 - Low
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

MSCX files contain syntax like the following:

<Instrument id="flute">
    <longName>Flute</longName>
     ...
    <instrumentId>wind.flutes.flute</instrumentId>
     ...
</Instrument>

Here, the id="flute" attribute is MuseScore's internal ID for the flute instrument, whereas <instrumentId>wind.flutes.flute</instrumentId> is actually the MusicXML ID. It should be renamed <MusicXMLid> to avoid confusion here and in the code.

Alternatively, the MusicXML could simply be removed from the MSCX format because we now have the MuseScore ID available and can use that to get the MusicXML ID from instruments.xml.

Example from https://github.com/musescore/MuseScore/pull/8099#pullrequestreview-6693…


Comments

In reply to by shoogle

Potential problem with removing the MusicXMLid from the MSCX file is when for some reason or the id or the MusicXMLid is changed in instruments.xml . This might cause some strange issue later on.
This must be checked carefully when making this change.

Fix version
4.0.0