Bar lines - GNU LilyPond
Description: GNU LilyPond

Next: Unmetered music, Previous: Partial measures, Up: Staff notation

#### 6.3.5 Bar lines

Bar lines delimit measures, but are also used to indicate repeats. Normally they are inserted automatically. Line breaks may only happen on bar lines.

Special types of bar lines can be forced with the `\bar` command

>          c4 \bar "|:" c4

The following bar types are available

To allow a line break where there is no visible bar line, use

    \bar ""

This will insert an invisible bar line and allow line breaks 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

>          <<
>            \new StaffGroup <<
>              \new Staff {
>                e'4 d'
>                \bar "||"
>                f' e'
>              }
>              \new Staff { \clef bass c4 g e g }
>            >>
>            \new Staff { \clef bass c2 c2 }
>          >>

##### Commonly tweaked properties

The command `\bar` bartype is a short cut for doing `\set Timing.whichBar =` bartype. Whenever `whichBar` is set to a string, a bar line of that type is created.

A bar line is created whenever the `whichBar` property is set. At the start of a measure it is set to the contents of `Timing.defaultBarType`. The contents of `repeatCommands` are used to override default measure bars.

You are encouraged to use `\repeat` for repetitions. See Repeats.

##### See also

In this manual: Repeats, System start delimiters.

Program reference: BarLine (created at Staff level), SpanBar (across staves).

Examples: `input/test/bar-lines.ly`,

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.