[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
musicxml2ly does not support non-numeric lyric numbers which are (accide
From: |
Hans Aikema |
Subject: |
musicxml2ly does not support non-numeric lyric numbers which are (accidentally) allowed by the MusicXML spec |
Date: |
Sat, 11 Sep 2021 12:52:50 +0200 |
Running a MusicXML-to-lilypond conversion for a score I received from the
arranger as a Sibelius 8.3.0 MusicXML export (Direct export, not from Dolet) I
encoutered breaking errors due to Sibelius’ use of none-numerical lyric numbers
(part<n>verse<m>) in at least the part-wise scores.
This case is documented online [1] [2] [3] as a known issue in MusicXML (which
has not been resolved up to now, and probably never will given the time passed
since it was raised).
I think lilypond’s musicxml2ly should support conversion of such none-numerical
lyric numbers.
Preferably by grouping lyrics based on the NMTOKEN stringvalue (as number
attribute semantics is “Specifies the lyric line when multiple lines are
present.” different values should be expected to refer to different lyric
lines)
Or if that would be difficult to achieve by ignoring none-numerical lyric
numbers, grouping all such ’non-numerical lyric number’ lyrics into a single
lyric line, and only issue a conversion warning that non-numerical lyric
numbers were encountered and the corresponding lyrics merged into a single
lyrics line.
Attached is a minimal example MusicXML that demonstrates the issue.
It shows that measure number, which is clearly documented in the spec to be a
’number’ that might contain non-numerical data, is properly supporting
conversion to lilypond for non-numerical measure numbers as the conversion
breaks only on measure ‘b’, the first measure with a non-numerical lyric number
(which is not clearly documented in the spec for being a ‘number’ field that
might contain non-numerical data)).
XMLLyricsNumberNMToken.musicxml
Description: Binary data
The resulting log of musicxml2ly:
—
musicxml2ly: Reading MusicXML from /Users/**/**/XMLLyricsNumberNMToken.musicxml
...
Traceback (most recent call last):
File "/opt/local/bin/musicxml2ly", line 3479, in <module>
main()
File "/opt/local/bin/musicxml2ly", line 3472, in main
voices = convert(filename, options)
File "/opt/local/bin/musicxml2ly", line 3333, in convert
(voices, staff_info) = get_all_voices(parts)
File "/opt/local/bin/musicxml2ly", line 2910, in get_all_voices
all_voices = voices_in_part_in_parts(parts)
File "/opt/local/bin/musicxml2ly", line 2900, in voices_in_part_in_parts
voices = voices_in_part(p)
File "/opt/local/bin/musicxml2ly", line 2887, in voices_in_part
part.extract_voices()
File "/opt/local/share/lilypond/2.22.1/python/musicxml.py", line 1588, in
extract_voices
voices[id].add_element(n)
File "/opt/local/share/lilypond/2.22.1/python/musicxml.py", line 1251, in
add_element
nr = l.get_number()
File "/opt/local/share/lilypond/2.22.1/python/musicxml.py", line 971, in
get_number
return int(self.number)
ValueError: invalid literal for int() with base 10: 'b'
—
[1] https://github.com/w3c/musicxml/issues/42
[2] https://forums.makemusic.com/viewtopic.php?f=12&t=2392#p6460
[3] https://musescore.org/en/node/13760
- musicxml2ly does not support non-numeric lyric numbers which are (accidentally) allowed by the MusicXML spec,
Hans Aikema <=