Jump to content

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

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
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
Line 24: Line 24:
</lilypond>
</lilypond>


[[Category:Specific notation]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Specific notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 08:35, 5 December 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
    }
  >>
}