Jump to content

Piano template with centered lyrics: Difference between revisions

From LilyPond wiki
m New category
Tags: Mobile edit Mobile web edit
mNo edit summary
 
Line 33: Line 33:
</lilypond>
</lilypond>


[[Category:Keyboards]]
[[Category:Really simple]]
[[Category:Template]]
[[Category:Template]]
[[Category:Keyboards]]
[[Category:Text]]
[[Category:Text]]
[[Category:Really simple]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 17:43, 12 December 2025

Instead of having a full staff for the melody and lyrics, lyrics can be centered between the staves of a piano staff.

\version "2.24"

upper = \relative c'' {
  \clef treble
  \key c \major
  \time 4/4

  a4 b c d
}

lower = \relative c {
  \clef bass
  \key c \major
  \time 4/4

  a2 c
}

text = \lyricmode {
  Aaa Bee Cee Dee
}

\score {
  \new PianoStaff <<
    \new Staff = upper { \new Voice = "singer" \upper }
    \new Lyrics \lyricsto "singer" \text
    \new Staff = lower { \lower }
  >>
  \layout { }
  \midi { }
}