Bar lines delimit measures, but are also used to indicate repeats. Normally, they are inserted automatically. Line breaks may only happen on barlines.
Special types
of barlines can be forced with the \bar
command:
c4 \bar "|:" c4
The following bar types are available:
c4 \bar "|" c \bar "" c \bar "|:" c \bar "||" c \bar ":|" c \bar ".|" c \bar ".|." c \bar "|."
For allowing linebreaks, there is a special command,
\bar "empty"This will insert an invisible barline, and allow linebreaks at this point.
In scores with many staves, a \bar
command in one staff is
automatically applied to all staves. The resulting bar lines are
connected between different staves of a StaffGroup:
<< \context StaffGroup << \new Staff { e'4 d' \bar "||" f' e' } \new Staff { \clef bass c4 g e g } >> \new Staff { \clef bass c2 c2 } >>
The command \bar
bartype is a short cut for doing
\property Score.whichBar =
bartype Whenever
whichBar
is set to a string, a bar line of that type is
created. At the start of a measure it is set to
defaultBarType
. The contents of repeatCommands
are used
to override default measure bars.
Property whichBar
can also be set directly, using \property
or \bar
. These settings take precedence over the automatic
whichBar
settings.
You are encouraged to use \repeat
for repetitions. See
Repeats.
The bar line objects that are created at Staff level are called BarLine, the bar lines that span staves are SpanBars.
The barlines at the start of each system are
SystemStartBar, SystemStartBrace, and
SystemStartBracket. They are spanner objects and
typically must be tuned from a \translator
block.
This page is for LilyPond-2.0.1 (stable-branch).