[MusicXML] Barlines in 2.0 score don't export

• Sep 8, 2013 - 21:16
Reported version
3.0
Type
Functional
Severity
S4 - Minor
Status
closed
Project
Tags

1. Open attached mscz (produced in 2.0).
2. 'Export...'.
3. Choose MusicXML.
4. 'Save'.
5. Open MusicXML.

Expected result (taken from mscz):

Barlines in 2.0 score don't export (Expected result).png

Actual result: The barlines don't import.

Barlines in 2.0 score don't export (Actual result).png

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.


Comments

@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, 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.

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)

Attachment Size
Span_barline.png 20.57 KB