MuseScore writes faulty MusicXML which fails validation

• Apr 5, 2012 - 12:24

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

In reply to 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 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...

Do you still have an unanswered question? Please log in first to post your question.