Jump to content

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

From LilyPond wiki
Import snippet from LSR
 
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
Line 1: Line 1:
The number of lines in a staff may changed by overriding the <code>StaffSymbol</code> property <code>line-count</code>.
The number of lines in a staff may changed by overriding the <code>StaffSymbol</code> property <code>line-count</code>.


<lilypond version="2.24.0">
<lilypond version="2.24">
upper = \relative c'' {
upper = \relative c'' {
   c4 d e f
   c4 d e f

Revision as of 18:45, 16 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
    }
  >>
}