w3c / musicxml

MusicXML specification
508 stars 57 forks source link

Ending without left barline #430

Closed hbitteur closed 2 years ago

hbitteur commented 3 years ago

Using Audiveris OMR, I stumbled on a score image with a system start as follows:

image

How should Audiveris export the 'ending' element to MusicXML format?

According to MusicXML reference documentation (4.0), 'ending' element is a child of 'barline' element. The problem in this example is there is no barline on the left side of the containing measure.

Audiveris, as an OMR software, is very "image-oriented". It can't see any barline when there is none. Should I force it to imagine there is a kind of "virtual barline" there, just to be able to export the ending sign? I hate doing this :-)

Thanks for any help /Hervé (Audiveris owner)

mscuthbert commented 3 years ago

Ah, interesting -- there's no way of knowing from this staff itself whether this is a mid-measure start of the volta or a start of measure volta -- you have to look at the end of the previous staff to see if there is a barline there, and then the volta is rendered "on" that barline.

From https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/ending/ I think that the best representation of this is an <ending> attached to a <barline location="left"><bar-style>none</bar-style></barline>

(p.s. nice to see you here Hervé -- sorry we haven't crossed paths at conferences in years!)

hbitteur commented 3 years ago

Hi Michael,

image

Using this larger view, we can see that this is a start of measure volta rather than a mid-measure.

So, we are back to deal with a virtual barline on the left side of our measure. And you are right, at https://www.w3.org/2021/06/musicxml40/musicxml-reference/data-types/bar-style/, documentation on "none" barline style says: "No barline appears".

This is not comfortable for an OMR, which here won't be able to use the presence of a barline interpretation to support the ending element interpretation. I think I can modify the algorithm to accept this configuration at the very beginning af a staff without concrete left barline. It's worth being tried.

P.S. I'm retired now and don't have the opportunity to attend "physical" conferences, especially now that MuseScore initial owners have left. But I'm more active than ever on Audiveris evolution...

mdgood commented 2 years ago

I would not recommend using the <bar-style> element in this situation. That is because a value of none would make the barline invisible even if it moved mid-system. I think it would be best for scanning software to treat endings beginning at the start of a system as a special case.

hbitteur commented 2 years ago

@mdgood Since the element needs to be nested within a element, we need to create such (artificial) barline element from nothing. If I understand your remark correctly, we should avoid the 'none' bar-style, and rather pick up some other bar-style. The barline would thus stay visible to prevent any unwanted user edition. Is this interpretation the correct one?

mdgood commented 2 years ago

@hbitteur The <bar-style> element is optional so just leave it out. That's what usually happens with <ending> elements - the <barline> element is just the place where the <ending> element goes. See the <ending> example for instance.