melody = \relative c' {
\clef "alto"
\hide Staff.Clef
\key c \major
\time 4/4
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
}
"text1" = \lyricmode {
Here the lyric lines are in the right
position because both lines are present.
When the top lyric line is only "\skip1",
the bottom line shifts up.
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
And, the bar lines are clashing with
several words when the top staff is
by itself.
}
"text2" = \lyricmode {
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
A B C D
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
\skip1 \skip1 \skip1 \skip1
}
upper = \relative c'' {
\clef treble
\key c \major
\time 4/4
| c c c c
| c c c c
| c c c c
%Shift staff spacing.
| c' c c c
| c c c c
| c c c c
| c c c c
| c c c c
%Shift staff spacing again.
| c' c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
| c c c c
}
lower = \relative c {
\clef bass
\key c \major
\time 4/4
c4 c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
c c c c
}
\layout {
\context {
\Lyrics
\override LyricText.self-alignment-X = #LEFT
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 0) (minimum-distance . 0 ) (padding . -2.5)
(stretchability . 0))
}
}
\score {
\new StaffGroup <<
\new Staff = "ChordsAndLyrics" \with {
\override StaffSymbol.line-positions = #'( 0 )
\override BarLine.bar-extent = #' (0 . 2.5)
\override StaffSymbol.Y-extent = #'(0 . 2.5)
}
<<
\new Voice = "mel1" { \hideNotes \melody }
\new Lyrics \with {
alignAboveContext = "ChordsAndLyrics"
\textLengthOn
} \lyricsto "mel1" \"text1"
\new Lyrics \with {
\override
VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 0) (minimum-distance . 0 )
(padding . -2.5) (stretchability . 0))
alignBelowContext = "ChordsAndLyrics"
} \lyricsto "mel1" \"text2"
>>
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
}