In normal time signatures, automatic beams can start on any note but can
only end in a few positions within the measure: beams can end on a beat,
or at durations specified by the properties in
Voice.autoBeamSettings
. The defaults for autoBeamSettings
are defined in scm/auto-beam.scm
.
The value of autoBeamSettings
is changed using
\override
and restored with \revert
:
\property Voice.autoBeamSettings \override #'(BE P Q N M) = dur \property Voice.autoBeamSettings \revert #'(BE P Q N M)Here, BE is the symbol
begin
or end
. It determines
whether the rule applies to begin or end-points. The quantity
P/Q refers to the length of the beamed notes (and `*
*
' designates notes of any length), N/M refers to a time
signature (wildcards, `* *
' may be entered to designate all time
signatures).
For example, if automatic beams should end on every quarter note, use the following:
\property Voice.autoBeamSettings \override #'(end * * * *) = #(ly:make-moment 1 4)Since the duration of a quarter note is 1/4 of a whole note, it is entered as
(ly:make-moment 1 4)
.
The same syntax can be used to specify beam starting points. In this example, automatic beams can only end on a dotted quarter note:
\property Voice.autoBeamSettings \override #'(end * * * *) = #(ly:make-moment 3 8)In 4/4 time signature, this means that automatic beams could end only on 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times 3/8 has passed within the measure).
Rules can also be restricted to specific time signatures. A rule that should only be applied in N/M time signature is formed by replacing the second asterisks by N and M. For example, a rule for 6/8 time exclusively looks like
\property Voice.autoBeamSettings \override #'(begin * * 6 8) = ...
If a rule should be to applied only to certain types of beams, use the
first pair of asterisks. Beams are classified according to the
shortest note they contain. For a beam ending rule that only applies
to beams with 32nd notes (and no shorter notes), use (end 1 32 *
*)
.
If a score ends while an automatic beam has not been ended and is still accepting notes, this last beam will not be typeset at all.
For melodies that have lyrics, you may want to switch off
automatic beaming. This is done by setting Voice.autoBeaming
to
#f
.
\autoBeamOff
,
\autoBeamOn
.
The rules for ending a beam depend on the shortest note in a beam. So, while it is possible to have different ending rules for eight beams and sixteenth beams, a beam that contains both eight and sixteenth notes will use the rules for the sixteenth beam.
In the example below, the autobeamer makes eight beams and sixteenth end at 3 eights; the third beam can only be corrected by specifying manual beaming.
It is not possible to specify beaming parameters that act differently in different parts of a measure. This means that it is not possible to use automatic beaming in irregular meters such as
5/8
.
This page is for LilyPond-2.0.1 (stable-branch).