Previous: Automatic accidentals, Up: Automatic notation


9.1.2 Setting automatic beam behavior

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 autoBeamSettings. The properties in autoBeamSettings consist of a list of rules for where beams can begin and end. The default autoBeamSettings rules are defined in scm/auto-beam.scm.

In order to add a rule to the list, use

#(override-auto-beam-setting '(be p q n m) a b [context])

For example, if automatic beams should always end on the first quarter note, use

#(override-auto-beam-setting '(end * * * *) 1 4)

You can force the beam settings to only take effect on beams whose shortest note is a certain duration

     
     \time 2/4
     #(override-auto-beam-setting '(end 1 16 * *) 1 16)
     a16 a a a a a a a |
     a32 a a a a16 a a a a a |
     #(override-auto-beam-setting '(end 1 32 * *) 1 16)
     a32 a a a a16 a a a a a |

[image of music]

You can force the beam settings to only take effect in certain time signatures

     
     \time 5/8
     #(override-auto-beam-setting '(end * * 5 8) 2 8)
     c8 c d d d
     \time 4/4
     e8 e f f e e d d
     \time 5/8
     c8 c d d d

[image of music]

You can also remove a previously set beam-ending rule by using

#(revert-auto-beam-setting '(be p q n m) a b [context])

be, p, q, n, m, a, b and context are the same as above. Note that the default rules are specified in scm/auto-beam.scm, so you can revert rules that you did not explicitly create.

     
     \time 4/4
     a16 a a a a a a a a a a a a a a a
     #(revert-auto-beam-setting '(end 1 16 4 4) 1 4)
     a16 a a a a a a a a a a a a a a a

[image of music]

The rule in a revert-auto-beam-setting statement must exactly match the original rule. That is, no wildcard expansion is taken into account.

     
     \time 1/4
     #(override-auto-beam-setting '(end 1 16 1 4) 1 8)
     a16 a a a
     #(revert-auto-beam-setting '(end 1 16 * *) 1 8) % this won't revert it!
     a a a a
     #(revert-auto-beam-setting '(end 1 16 1 4) 1 8) % this will
     a a a a

[image of music]

If automatic beams should end on every quarter in 5/4 time, specify all endings

#(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
#(override-auto-beam-setting '(end * * * *) 1 2 'Staff)
#(override-auto-beam-setting '(end * * * *) 3 4 'Staff)
#(override-auto-beam-setting '(end * * * *) 5 4 'Staff)
...

The same syntax can be used to specify beam starting points. In this example, automatic beams can only end on a dotted quarter note

#(override-auto-beam-setting '(end * * * *) 3 8)
#(override-auto-beam-setting '(end * * * *) 1 2)
#(override-auto-beam-setting '(end * * * *) 7 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).

If any unexpected beam behaviour occurs, check the default automatic beam settings in scm/auto-beam.scm for possible interference, because the beam endings defined there will still apply on top of your own overrides. Any unwanted endings in the default vales must be reverted for your time signature(s).

For example, to typeset (3 4 3 2)-beam endings in 12/8, begin with

%%% revert default values in scm/auto-beam.scm regarding 12/8 time
#(revert-auto-beam-setting '(end * * 12 8) 3 8)
#(revert-auto-beam-setting '(end * * 12 8) 3 4)
#(revert-auto-beam-setting '(end * * 12 8) 9 8)

%%% your new values
#(override-auto-beam-setting '(end 1 8 12 8) 3 8)
#(override-auto-beam-setting '(end 1 8 12 8) 7 8)
#(override-auto-beam-setting '(end 1 8 12 8) 10 8)

If beams are used to indicate melismata in songs, then automatic beaming should be switched off with \autoBeamOff.

Predefined commands

\autoBeamOff, \autoBeamOn.

Commonly tweaked properties

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]

Bugs

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. The same holds polyphonic voices, entered with << ... \\ ... >>. If a polyphonic voice ends while an automatic beam is still accepting notes, it is not typeset.


Previous: Automatic accidentals, Up: Automatic 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.