[Capella import] MuseScore stops reading Capella files at <barline>...<\barline>
I got a Capella CapXML 2.0 file that is missing some measures when opened in MuseScore 2.0.0 Revision 6e47f74.
Further examination revealed that MuseScore stop reading at the first occurrence of <barline>...<\barline>. When I replace all <barline>..</barline> by <barline /> elements the file get opened successfull.
There are two sort of <barline>..</barline> elements in the Capella file.
-
Breathe marks
<barline>
<drawObjects>
<drawObj>
<text x="-2.46875" y="-1.9375">
<font face="capella3" height="18" weight="0" charSet="2" pitchAndFamily="0"/>
<content>~</content>
</text>
<basic scope="system"/>
</drawObj>
</drawObjects>
</barline> -
Repeat counter
<barline type="repEnd" range="full">
<drawObjects>
<drawObj>
<text x="-3.78125" y="-2.6875">
<font face="Times New Roman" height="12" weight="0" italic="true" charSet="1" pitchAndFamily="0"/>
<content>2x</content>
</text>
<basic/>
</drawObj>
</drawObjects>
</barline>
Comments
Can you attach a file to reproduce the issue?
If anyone wants to take a look, barline reading happens here I believe https://github.com/musescore/MuseScore/blob/c887ce2106e23743ba0dfeea6f5…
I think the real action is going on in https://github.com/musescore/MuseScore/blob/c887ce2106e23743ba0dfeea6f5…
I attached a demonstration file. I trimmed the original Capella file for this purpose.
It contains just 2 measures with 4 half notes, but only one measure with two notes is visible in MuseScore.
If you remove the <barline> ... </barline> element all four notes get visible.
Unfortunately, MuseScore doesn't support text or breath mark on bar line. So eventually the import of the breath or the text (which I gather are the same in capella) could be a feature request. I will fix the barline reading so MuseScore does not stop when it encounter such a barline.
Fixed in 7d68766f9c
Checked it with 8b5c197. Works as supposed now.
Thank you!
Automatically closed -- issue fixed for 2 weeks with no activity.