I have to write down a simple song with LilyPond (my iPad music book did disappear when I've tried to recover a backup, so I think it is save to store the music sheets in text form), but I can't figure out, how to align words, melody and chord. I've managed somehow to align words and melody (it seems, as if they are associated over the timing), but I can't find it. I tried everything, but the chords showed up only directly from the beginning of then song, over every note, not about the bars or wherever I would place them.
While I saw some examples, where they were correctly set, I never managed to do it. Also, I can't figure out how to set a partial with two notes. This is my experiment:
\include "predefined-guitar-fretboards.ly"
verseI = \lyricmode {
\set stanza = #"1."
Ach was |
wird denn meine Mutter |
sagen wenn |
ich einst kehr zu ihr | zurück?
}
verseII = \lyricmode {
\set stanza = #"2."
This is the second verse.
}
theChords = \chordmode {
d | g | a | d
}
staffMelody = \relative c' {
\key c \major
\clef treble
\time 4/4
\partial 8*4 a8 d8 |
f4 f8 f8 g4 f4 |
e2 b b' |
a g f |
% \bar "|."
}
\score {
<<
\context ChordNames { \theChords }
\new Staff {
\context Voice = "voiceMelody" { \staffMelody }
}
\new Lyrics = "lyricsI" {
\lyricsto "voiceMelody" \verseI
}
\new Lyrics = "lyricsII" {
\lyricsto "voiceMelody" \verseII
}
>>
\layout { }
\midi { }
}