[MusicXML] Barlines in 2.0 score don't export
1. Open attached mscz (produced in 2.0).
2. 'Export...'.
3. Choose MusicXML.
4. 'Save'.
5. Open MusicXML.
Expected result (taken from mscz):
Actual result: The barlines don't import.
Note: I also attach the produced MusicXML.
If the score you open in 2.0 is produced in 1.3, the barlines will export.
I imported the MusicXML into MuseScore 1.3 and the barlines didn't appear.
Using MuseScore 2.0 Nightly Build (50a2531) - Mac 10.7.5.
Attachment | Size |
---|---|
Barlines in 2.0 score don't export.mscz | 1.41 KB |
Barlines in 2.0 score don't export.xml | 3.42 KB |
Barlines in 2.0 score don't export (Expected result).png | 18.53 KB |
Barlines in 2.0 score don't export (Actual result).png | 17.92 KB |
Comments
Issue still present in current trunk.
@akhilesh, are you a developer and planning to fix this ? If so, welcome and thanks for your help. If not, please do not assign issues to yourself.
@Leon: akhilesh is indeed a developer starting contributions in light of GSoC2016
Leon, as jeetee mentioned, I am a new developer here and I'm working on this issue currently. I'd be glad for any advice you can give me and/or point out what part of the code might be causing this issue.
Hi Akhilesh,
you want to look at functions ExportMusicXml::write(), ExportMusicXml::writeElement() and ExportMusicXml::barlineRight(). The current code assumes that a measure's right barline type is always found in measure::endBarLineType(). It seems this is not true for a barline with customSubtype = 1, as is the case for barlines in file "Barlines in 2.0 score don't export.mscz".
A few notes:
I don't know how to create barlines with customSubtype = 1.
Be careful not to break barlines in multi-measure rests.
Good luck, Leon.
@Leon, that can be solved by looking at the subtype of a barline whenever it comes across a barline, and writing that subtype to the xml file. Currently, ExportMusicXml::barlineRight() looks at what the measure ending is "supposed to be".
However, I can't seem to find out the xml rules for writing other properties of a barline (other than its subtype) to an xml file. For instance, number of staves it spans across, the starting and ending staff number that it spans, span preset etc. Do you know where I can find these out from?
The xml tutorial http://www.musicxml.com/wp-content/uploads/2012/12/musicxml-tutorial.pdf doesn't talk about these properties.
Also, thanks :)
Partial fix: https://github.com/musescore/MuseScore/pull/2499
I don't know how to export staffs spanned for a barline. Need help on that one.
Barline span is implicitly assumed for multi-staff parts and explicitly handled by the group-barline element. See complex type part-group in the MusicXML documentation at http://www.musicxml.com/UserManuals/MusicXML/MusicXML.htm.
new PR https://github.com/musescore/MuseScore/pull/2503
Leon: I meant, the staffs within a particular stave, even for a single-stave part. I've attached a picture to convey more clearly. I'm talking about custom span presets (like there are options for 'tick' and 'short' barlines)
It appears that XML supports only tick 1 and short 1 in terms of tick presets
Most of the barlines but the tick and short currently export and import correctly in master bf2f3774b3
See #125591: Support tick and short barline in MusicXML import/export for the missing support.
Automatically closed -- issue fixed for 2 weeks with no activity.