[MusicXML] Import can produce empty voice 1
MuseScore 1.1, current branch and trunk r4754
Finale produces MusicXML file with no voice 1 in some measures. When importing such a file, MuseScore ends up with no voice 1 in these measures. As MuseScore assume voice 1 is always present, it could lead to different problems.
See measure 7 to 9 in the attached file.
Attachment | Size |
---|---|
Salva_me_da_Tanta_Infamia.xml | 68.89 KB |
Comments
Another example from Notion 3 : http://musescore.org/sites/musescore.org/files/teste_xml.xml
A few questions, as I'd like to fully understand the issue.
- what is the expected behavior (filling voice 1 with rests if not present in the MusicXML file ?)
- what kind of issues are caused by the current implementation (I can't find any) ?
- where is this constraint documented (source code or documentation) and enforced (source code) ?
Found the answer to my third question in edit.cpp function Score::deleteItem(), which contains the remark: " voice 0 rests cannot be removed".
Initial fix in 0.9.6 in revision 5096 (fill voice 0 with rests in case the MusicXML import left gaps).
Sorry I missed your questions in this thread.
So regarding number 3, rests can't be deleted from voice 0 in the user interface. If you exchange a voice that doesn't have all beats filled with voice 0, the rests are recreated. So the code about exchangeVoice is also a place to look at.
Expected behavior : I would say put rests like you did, but make them invisible.
Issue encountered : For example, you can't edit a voice with missing rests except if you exchange voices twice.
Fixed in 0.9.6 branch revision 5097.
Synced 0.9.6 branch fix to trunk revision 5106. Making rests invisible still TODO.
Invisible rests done in 0.9.6 branch revision 5109.
Invisible rests done in trunk revision 5116.
Automatically closed -- issue fixed for 2 weeks with no activity.