Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chord names not working in MusicXML conversion #141

Open
kwertyops opened this issue May 30, 2020 · 1 comment
Open

Chord names not working in MusicXML conversion #141

kwertyops opened this issue May 30, 2020 · 1 comment

Comments

@kwertyops
Copy link

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:

Screen Shot 2020-05-30 at 11 49 06 AM

When converted to MusicXML using python-ly, the resulting MusicXML looks like this (rendered using MuseScore):

Screen Shot 2020-05-30 at 11 46 26 AM

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):

  1. It contains none of the accompanying chord symbols.
  2. 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!
...
@leonard-l-thompson
Copy link

I appreciate this, as I'm interested in Chordnames export functionality as well.
I would add also that attempts to render notated polyphony (as opposed to chord sysmbols) via \chordmode input produces the same sort of undesired xml output as above. So, in lilypond,
\new Staff \new Voice \chordmode { g:7 }
will produce four pitches ( g, b, d, f) on the staff without a problem, but xml export is not yet capable of interpreting the same expression, it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants