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



5.3.8 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

[image of music]

The following bar types are available

[image of music]

For allowing line breaks, there is a special command,

\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 (lilypond-internals)

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

[image of music]

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 (lilypond-internals) (created at Staff (lilypond-internals) level), SpanBar (lilypond-internals) (across staves).

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

Read comments on this page, or add one.

This page is for LilyPond-2.5.11 (development-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.