Jump to content

Adjusting vertical spacing of lyrics

From LilyPond wiki
Revision as of 12:07, 30 December 2025 by Lemzwerg (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This snippet shows how to bring the lyrics line closer to the staff.

\version "2.24"

music = \relative c' { c4 d e f | g4 f e d | c1 }
text = \lyricmode { aa aa aa aa aa aa aa aa aa }

<<
  \new Staff \new Voice = melody \music
  % Default layout:
  \new Lyrics \lyricsto melody \text

  \new Staff \new Voice = melody \music
  % Reducing the minimum space below the staff and above the lyrics.
  \new Lyrics \with {
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
      #'((basic-distance . 1))
  } \lyricsto melody \text
>>