Next: , Up: Beams


1.2.4.1 Automatic beams

By default, beams are inserted automatically:

     
     \time 2/4 c8 c c c
     \time 6/8 c c c c8. c16 c8

[image of music]

If these automatic decisions are not satisfactory, beaming can be entered explicitly; see Manual beams. It is also possible to define beaming patterns that differ from the defaults; see Setting automatic beam behavior. The default beaming rules are defined in scm/auto-beam.scm.

Automatic beaming may be turned off and on with \autoBeamOff and \autoBeamOn commands:

     
     c4 c8 c8. c16 c8. c16 c8
     \autoBeamOff
     c4 c8 c8. c16 c8.
     \autoBeamOn
     c16 c8

[image of music]

Predefined commands

\autoBeamOff, \autoBeamOn.

Selected Snippets

Beaming patterns may be altered with the beatGrouping property,

     
     \time 5/16
     \set beatGrouping = #'(2 3)
     c8[^"(2+3)" c16 c8]
     \set beatGrouping = #'(3 2)
     c8[^"(3+2)" c16 c8]

[image of music]

The beams of consecutive 16th (or shorter) notes are, by default, not sub-divided. That is, the three (or more) beams stretch unbroken over entire groups of notes. This behavior can be modified to sub-divide the beams into sub-groups by setting the property subdivideBeams. When set, multiple beams will be sub-divided at intervals defined by the current value of beatLength by reducing the multiple beams to just one beam between the sub-groups. Note that beatLength lives in the Score context and defaults to a quarter note. It must be set to a fraction giving the duration of the beam sub-group using the make-moment function, as shown here:

     
     c32[ c c c c c c c]
     \set subdivideBeams = ##t
     c32[ c c c c c c c]
     % Set beam sub-group length to an eighth note
     \set Score.beatLength = #(ly:make-moment 1 8)
     c32[ c c c c c c c]
     % Set beam sub-group length to a sixteenth note
     \set Score.beatLength = #(ly:make-moment 1 16)
     c32[ c c c c c c c]

[image of music]

For more information about make-moment, see Time administration.

Line breaks are normally forbidden when beams cross bar lines. This behavior can be changed by setting the breakable property: \override Beam #'breakable = ##t.

     
     \override Beam #'breakable = ##t
     c8 \repeat unfold 15 { c[ c] } c

[image of music]

Kneed beams are inserted automatically when a large gap is detected between the note heads. This behavior can be tuned through the auto-knee-gap property. A kneed beam is drawn if the gap is larger than the value of auto-knee-gap plus the width of the beam object (which depends on the duration of the notes and the slope of the beam). By default auto-knee-gap is set to 5.5 staff spaces.

     
     f8 f''8 f8 f''8
     \override Beam #'auto-knee-gap = #6
     f8 f''8 f8 f''8

[image of music]

See also

Notation Reference: Manual beams, Setting automatic beam behavior.

Installed Files: scm/auto-beam.scm.

Snippets: Rhythms.

Internals Reference: Beam.

Known issues and warnings

Automatically kneed cross-staff beams cannot be used together with hidden staves. See Hiding staves.

Beams can collide with note heads and accidentals in other voices

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

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

Your suggestions for the documentation are welcome.

Other languages: français, español, deutsch.