-
Notifications
You must be signed in to change notification settings - Fork 39
Chord names not working in MusicXML conversion #141
Description
Here is a Lilypond file that produces a staff with a melody and annotated chord names above the staff:
\version "2.13.2"
\score
{
<<
\new ChordNames { \chords {
| bes1:6
| bes2:6 g2:7 | c2:min7 f2:7 | bes2 g2:min7 | c2:min7 f2:7 | f2:min7 bes2:7 | es2:7 aes2:7 | d2:min7 g2:7 | c2:min7 f2:7 |
}
}
\new Staff
<<
{
| f'4 es'8. bes16 des'4 es'4
\bar "||" \mark \default bes4 bes4. r8 r4
| r1
| r2 d4 a8 c'8~
| c'16 bes8 g16~ g8 bes8 des'4 c'8 bes8
| c'4. bes8 aes8 c'8 b8 a8
| bes8 fis8~ \tuplet 3/2 {fis8 g8 bes8} des'8. aes16 cis'8 d'8
| bes8 c'8 g8 bes4 bes8 r4
| r1 |
}
>>
>>
}
Rendered normally with Lilypond, the result is this:
When converted to MusicXML using python-ly, the resulting MusicXML looks like this (rendered using MuseScore):
I can confirm that this visualization matches the underlying XML, I'm including the image only because it's easier to see the discrepancy. So, it appears that when converted to MusicXML, this piece produces the correct melody, but with two major problems (ignoring the double-bar line becoming a measure, which seems like a separate problem):
- It contains none of the accompanying chord symbols.
- There are additional measures beyond what is written that contain additional whole and half notes at the end of the piece (this is confirmed by looking at the raw XML). These notes seem to correspond to the roots of the chords that were specified in the chord block.
During conversion from ly to xml, the following repeated errors are reported (this is just a snippet, they appear repeatedly, presumably once for each chord symbol in the original):
...
Warning: ChordSpecifier not implemented!
'ParseSource' object has no attribute 'ChordSpecifier'
Warning: ChordItem not implemented!
'ParseSource' object has no attribute 'ChordItem'
Warning: ChordItem not implemented!
'ParseSource' object has no attribute 'ChordItem'
Warning: ChordSpecifier not implemented!
'ParseSource' object has no attribute 'ChordSpecifier'
Warning: ChordItem not implemented!
'ParseSource' object has no attribute 'ChordItem'
Warning: ChordItem not implemented!
'ParseSource' object has no attribute 'ChordItem'
Warning: ChordSpecifier not implemented!
...

