Next: Deeper nested staff groups, Previous: Instantiating new staves, Up: Displaying staves
Various contexts exist to group single staves together in order to form multi-stave systems. Each grouping context sets the style of the system start delimiter and the behavior of bar lines.
If no context is specified, the default properties will be used: the group is started with a vertical line, and the bar lines are not connected.
<< \new Staff { c1 c } \new Staff { c1 c } >>
In the StaffGroup
context, the group is started with a
bracket and bar lines are drawn through all the staves.
\new StaffGroup << \new Staff { c1 c } \new Staff { c1 c } >>
In a ChoirStaff
, the group starts with a bracket, but bar
lines are not connected.
\new ChoirStaff << \new Staff { c1 c } \new Staff { c1 c } >>
In a GrandStaff
, the group begins with a brace, and bar
lines are connected between the staves.
\new GrandStaff << \new Staff { c1 c } \new Staff { c1 c } >>
The PianoStaff
is identical to a GrandStaff
, except
that it supports printing the instrument name directly. For
details, see Instrument names.
\new PianoStaff << \set PianoStaff.instrumentName = "Piano" \new Staff { c1 c } \new Staff { c1 c } >>
Each staff group context sets the property
systemStartDelimiter
to one of the following values:
SystemStartBar
, SystemStartBrace
, or
SystemStartBracket
. A fourth delimiter,
SystemStartSquare
, is also available, but it must be
explicitly specified.
Use square bracket at the start of a staff group
The system start delimiter SystemStartSquare
can be used by
setting it explicitly in a StaffGroup
or ChoirStaffGroup
context.
\score { \new StaffGroup { << \set StaffGroup.systemStartDelimiter = #'SystemStartSquare \new Staff { c'4 d' e' f' } \new Staff { c'4 d' e' f' } >> } }
Display bracket with only one staff in a system
If there is only one staff in one of the staff types
ChoirStaff
, InnerChoirStaff
, InnerStaffGroup
or StaffGroup
, the bracket and the starting bar line will not
be displayed as standard behavior. This can be changed by overriding
the relevant properties, as demonstrated in this example.
Note that in contexts such as PianoStaff
and GrandStaff
where the systems begin with a brace instead of a bracket, another
property has to be set, as shown on the second system in the example.
\markup \column { \score { \new StaffGroup << % Must be lower than the actual number of staff lines \override StaffGroup.SystemStartBracket #'collapse-height = #1 \override Score.SystemStartBar #'collapse-height = #1 \new Staff { c'1 } >> \layout { } } \score { \new PianoStaff << \override PianoStaff.SystemStartBrace #'collapse-height = #1 \override Score.SystemStartBar #'collapse-height = #1 \new Staff { c'1 } >> \layout { } } }
Mensurstriche layout (bar lines between the staves)
The mensurstriche-layout where the bar lines do not show on the staves
but between staves can be achieved with a StaffGroup
instead of
a ChoirStaff
. The bar line on staves is blanked out by setting
the transparent
property.
global = { \override Staff.BarLine #'transparent = ##t s1 s % the final bar line is not interrupted \revert Staff.BarLine #'transparent \bar "|." } \new StaffGroup \relative c'' { << \new Staff { << \global { c1 c } >> } \new Staff { << \global { c c } >> } >> }
Music Glossary: brace, bracket, grand staff.
Notation Reference: Instrument names.
Snippets: Staff notation.
Internals Reference: Staff, StaffGroup, ChoirStaff, GrandStaff, PianoStaff, SystemStartBar, SystemStartBrace, SystemStartBracket, SystemStartSquare.
Esta página corresponde a LilyPond-2.11.58 (rama de desarrollo).
Informe de los fallos a través de la lista en español lilypond-es, o en inglés a través de http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Se agradecen las sugerencias para la documentación.
Otros idiomas: français.