Developing MusicXML export for REAPER; MuseScore fails to import or crashes

• Jun 27, 2016 - 22:25

Hello MuseScore. I am working on MusicXML export from REAPER and have come across a problem.

The attached musescore-import-fail.xml fails to import. The error message says that measure 1, staff 3 is an incorrect length, though it appears to be a correct 4/4 measure.

The attached musescore-import-crash.xml crashes MuseScore 2.0.3. The only difference from musescore-import-fail.xml is that it contains a dotted note within a triplet.

Both files consist of two parts of one measure each; the first part contains only a whole note rest; the second part contains two staves. What is odd is that both files import properly if the first part is removed. The attached musescore-import-ok.xml is identical to musescore-import-crash.xml with the first part removed.

MusicXML export from REAPER is under development and it is certainly possible that the problematic files are improperly formed (though ideally MuseScore would not crash on importing improperly formed MusicXML). I would appreciate any guidance as to whether the files are in fact incorrect, or if this is a bug in MuseScore. If nobody is able to help out, I'll look into building MuseScore to see what's happening on the receiving end.

I wondered if perhaps the fractional durations of the triplets were the source of the problem but the behavior appears to be the same if the durations are all converted to integer (in such a way as to ensure the measure is complete).

Thanks for any help!
- schwa


Comments

The staff tags are not correct. In the first part, you use two staves, see the "staves" element in the first measure. In the second part, you also want to use two staves apparently, since you use staff=2, but you don't have a staves tag.

In reply to by [DELETED] 5

Thank you, that's the problem. In fact the initial measure attributes are not written at all for the second part -- the code does not write the attributes if they have not changed from the previous measure, but that test needs to be reset for each part.

Cheers!

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