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


6.4.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

[image of music]

The following bar types are available

[image of music]

In addition, you can specify "||:", which is equivalent to "|:" except at line breaks, where it gives a double bar line at the end of the line and a start repeat at the beginning of the next line.

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 (without increasing the bar number counter).

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, PianoStaff, or ChoirStaff.

     
     <<
       \new 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]

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).


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

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

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Other languages: French.