MusicXML - bad export of trill lines
Ubuntu 14.04, GIT commit: a98b748
I see similar results on 2.0.2, 2.0.3, and the master. Trills are either not exported at all, or are exported as "stop" elements with no "start", or they have a "number" of 0 which is invalid. Try the following:
1) load attached file
2) export to MusicXML
3) import resulting file
Result: trills are lost. Examination of the MusicXML file shows "stop" elements with no "start", and errors are printed to the console about this both on export and import.
I am not sure what conditions lead to a "number" of "0", but you can see this happening in https://musescore.org/en/node/102111. I thought it might have something to do with the grace notes, but my test case doesn't reproduce this, so I'm not sure what the variable is. Maybe the existence of notes on another staff.
Attachment | Size |
---|---|
trill.mscz | 4.17 KB |
Comments
Did a quick investigation, but did not find the cause yet. It is definitely not caused by the grace notes, I could reproduce the issue easily in similar files without grace notes.
Note that the MusicXML autotester includes several files containing trills that do not fail, so this may be a case of different behaviour between MuseScore and MusicMXL file import.
I'll try to fix this issue
Leon: Just wanted to confirm- am I right in saying the attached XML code (fragment) for the two notes involved should give the trill line as attached in Expected.png? That is, a trill starting from one note and ending at another should have the start tag in the first and the stop in the second note in XML.
However, importing this in musescore gives the score as attached in Actual.png. Could you please clarify if I'm right about the Expected.png? Also attached the complete XML file.
Seeing as how there's been no progress on this in a year, I'll try to look into the cause.
I just tried such long trills in Musescore 3.0, and many of them are not exported, or exported as a stop-only element. I look into the Musescore file, and found some spanners have more attached elements, while some are simpler, but don't know which ones can and which ones can't be exported. You can try this file, which has lots of trills, some even with accidentals, and those accidentals are also not exported, causing my braille transcription completely down for such pieces, and I have to give up!
The piece I mentioned above is https://musescore.com/user/6105546/scores/5055217
Regards
Haipeng
relates to #270643: [EPIC] MusicXML import/export issues