Changing the number of lines in a staff

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

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
    }
  >>
}

[image of music]

LilyPond snippets v2.25.15 (development-branch).