MuseScore writes faulty MusicXML which fails validation
I saved the attached MusicXML file from MuseScore and it specifies a midi-program value of 0. According to musicxml.xsd the minimum legal value is 1.
Regards
James Sutton
Dolphin Computing
Attachment | Size |
---|---|
Joshi-ms.xml | 26.15 KB |
Comments
Could you attach the original MuseScore file? It looks like the program number was already wrong in this one.
In reply to Could you attach the original by [DELETED] 5
here is the original xml imported into MuseScore. This sort of minimal xml from Symphony Pro is converted by MuseScore into more useful xml with stem directions etc. specified suitable for SeeScore
Thanks
James Sutton
In reply to original was also XML! by jsutton
OK I made a fix for next version (2.0) to not export 0 value for program and channel.
In reply to OK I made a fix for next by [DELETED] 5
MIDI program change numbers are from 0 to 127 - well actually 0x 00 to 0x 7F :)
A value of 0 is perfectly valid - MusicXML has it wrong!
In order to satisfy this quirk of MusicXML you should add 1 to the Program Change number when exporting to MusicXML and consequnetly subtract 1 from it when importing into MuseScore
Otherwise you will be getting wrong instruments at certain points.
In reply to MIDI program change numbers by ChurchOrganist
Yes... MuseScore uses internally 0 based index for midi data while MusicXML use 1 based index. In MuseScore 1.2 we do use "+1" / "-1". The problem here is that the value is initialized with -1 and the imported MusicXML doesn't have information about midi program, so it was still -1... and -1 + 1 = 0, so the bug...
In reply to OK I made a fix for next by [DELETED] 5
that was quick! Thanks
In reply to Thank you by jsutton
You are welcome! If you find MuseScore useful...