frescobaldi / python-ly

A Python package and commandline tool to manipulate LilyPond files
https://pypi.org/project/python-ly
131 stars 32 forks source link

Exporting lyrics to MusicXML #57

Open halvorlu opened 8 years ago

halvorlu commented 8 years ago

I'm trying to export some vocal music to MusicXML, but I cannot seem to get any lyrics exported to the MusicXML file. From the source code it seems that it should be possible. A simple example file test.ly could be

\version "2.18.2"
\relative { d''8 c16 a bes8 f ees' d c4 }
\addlyrics { „Schad’ um das schö -- ne grü -- ne Band, }

ly musicxml test.ly only outputs the music, not the lyrics. Is lyrics export possible, and if so, how?

PeterBjuhr commented 8 years ago

\lyricsto has some support but I don't think support for \addlyrics has been implemented yet...

insulsa commented 4 years ago

Is there an example to tell how to use lyricsto? This,

\version "2.18.2"
<<
\new Voice = "2"  { a'4. g'8 e'4 g'4 | d'4 e'4 d'2 }
\new Lyrics \lyricsto "2" { ha i jie ke el em ne }
>>

prints a good pdf with lilypond, but ly musicxml produces the following:

Context not implemented: Lyrics
Warning: empty part: 
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN"
                                "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.0">
  <identification>
    <encoding>
      <software>python-ly 0.9.5</software>
      <encoding-date>2020-04-26</encoding-date>
    </encoding>
  </identification>
  <part-list />
</score-partwise>