jacques-menu / musicformats

The code base, documentation and examples of textual music scores formats handling and conversions tools
Mozilla Public License 2.0
2 stars 2 forks source link

xml2ly: old MusicXML code causes LilyPond errors #5

Open lemzwerg opened 5 months ago

lemzwerg commented 5 months ago

[ef5018a8347cc3762c2f0b401e6389e186ff1cba]

Consider the MusicXML file in the attached archive and process it with

xml2ly wavy-line.xml > wavy-line.ly

Processing the .ly file with LilyPond causes a warning and bad output:

wavy-line.ly:48:1: warning: Unattached TextSpanEvent

Bar 2 probably contains problematic MusicXML code:

<ornaments>
  <wavy-line number="1" type="start"/>
  <wavy-line number="1" type="stop"/>
</ornaments>

Here, a wavy line starts and ends at the same time step, but there is no <trill-mark/> tag... I think it should be exactly the opposite, according to

https://www.w3.org/2021/06/musicxml40/musicxml-reference/examples/accidental-mark-element-ornament/

(if you confirm that I'm going to update the original test file in the LilyPond git repository accordingly). The correct rendering of the second bar in wavy-line.xml is to output no trill at all, I guess, probably emitting a warning.

Anyway, xml2ly translates the MusicXML code to \startTrillSpan \stopTrillSpan (not counting the problem with the incorrectly inserted \barNumberCheck), which LilyPond doesn't like, since you cannot start and stop a span at the same time step.

wavy-line.zip