Next: Ossia staves, Up: Modifying single staves
The lines of a staff belong to the StaffSymbol
grob.
StaffSymbol
properties can be modified to change the
appearance of a staff, but they must be modified before the staff
is created.
The number of staff lines may be changed. The clef position and the position of middle C may need to be modified to fit the new staff. For an explanation, refer to the snippet section in Clef.
\new Staff \with { \override StaffSymbol #'line-count = #3 } { d4 d d d }
The vertical position of staff lines and the number of staff lines can be defined at the same time. As the following example shows, note positions are not influenced by the staff line positions.
Note: The 'line-positions property overrides the
'line-count property. The number of staff lines is
implicitly defined by the number of elements in the list of values
for 'line-positions
|
\new Staff \with { \override StaffSymbol #'line-positions = #'(7 3 0 -4 -6 -7) } { a4 e' f b | d1 }
Staff line thickness can be modified. The thickness of ledger lines and stems are also affected, since they depend on staff line thickness.
\new Staff \with { \override StaffSymbol #'thickness = #3 } { e4 d c b }
Ledger line thickness can be set independently of staff line thickness.
\new Staff \with { \override StaffSymbol #'ledger-line-thickness = #'(1 . 0.2) } { e4 d c b }
The distance between staff lines can be changed. This setting has influence on ledger lines as well.
\new Staff \with { \override StaffSymbol #'staff-space = #1.5 } { a4 b c d }
The width of a staff can be modified. The unit is one staff space. The spacing of objects inside the staff is not influenced by this setting.
\new Staff \with { \override StaffSymbol #'width = #23 } { a4 e' f b | d1 }
Further details about the properties of StaffSymbol
can be
found here: staff-symbol-interface.
Modifications to staff properties in the middle of a score can be
placed between \stopStaff
and \startStaff
:
c2 c \stopStaff \override Staff.StaffSymbol #'line-count = #2 \startStaff b2 b \stopStaff \revert Staff.StaffSymbol #'line-count \startStaff a2 a
\startStaff
,
\stopStaff
.
Making some staff lines thicker than the others
For pedagogical purposes, a staff line can be thickened (e.g., the
middle line, or to emphasize the line of the G clef). This can be
achieved by adding extra lines very close to the line that should be
emphasized, using the line-positions
property of the
StaffSymbol
object.
{ \override Staff.StaffSymbol #'line-positions = #'(-4 -2 -0.2 0 0.2 2 4) d'4 e' f' g' }
Music Glossary: line, ledger line, staff.
Notation Reference: Displaying pitches.
Snippets: Staff notation.
Internals Reference: StaffSymbol, staff-symbol-interface.
When setting vertical staff line positions manually, bar lines are always centered on position 0, so the maximum distance between the outermost bar lines in either direction must be equal.
This page is for LilyPond-2.11.58 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.