Jump to content

Changing the number of lines in a staff

From LilyPond wiki
Revision as of 18:45, 16 November 2025 by Jean Abou Samra (talk | contribs) (Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series)

The number of lines in a staff may changed by overriding the StaffSymbol property line-count.

\version "2.24"

upper = \relative c'' {
  c4 d e f
}

lower = \relative c {
  \clef bass
  c4 b a g
}

\score {
  \context PianoStaff <<
    \new Staff {
      \upper
    }
    \new Staff {
      \override Staff.StaffSymbol.line-count = #4 
      \lower
    }
  >>
}