Jump to content

Changing the number of lines in a staff: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 27: Line 27:
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]

Revision as of 22:49, 21 November 2025

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