Sometimes it is necessary to change music layout by hand. When music is formatted, layout objects are created for each symbol. For example, every clef and every note head is represented by a layout object. These layout objects also carry variables, which we call layout properties. By changing these variables from their values, we can alter the look of a formatted score:
c4 \property Voice.Stem \override #'thickness = #3.0 c4 c4 c4
In the example shown here, the layout property thickness
(a
symbol) is set to 3 in the Stem
layout objects of the current
Voice. As a result, the notes following \property
have thicker
stems.
In most cases of manual overrides, only a single object must be
changed. This can be achieved by prefixing \once
to the
\property
statement, i.e.
\once \property Voice.Stem \set #'thickness = #3.0
Some overrides are so common that predefined commands are provided as
a short cut. For example, \slurUp
and \stemDown
. These
commands are described in
the
Notation manual, under the sections for slurs and stems
respectively.
The exact tuning possibilities for each type of layout object are documented in the program reference of the respective object. However, many layout objects share properties, which can be used to apply generic tweaks. We mention a couple of these:
extra-offset
property, which
has a pair of numbers as value, moves around objects in the printout.
The first number controls left-right movement; a positive number will
move the object to the right. The second number controls up-down
movement; a positive number will move it higher. The unit of these
offsets are staff-spaces. The extra-offset
property is a
low-level feature: the formatting engine is completely oblivious to
these offsets.
In the following example example, the second fingering is moved a little to the left, and 1.8 staff space downwards:
\stemUp f-5 \once \property Voice.Fingering \set #'extra-offset = #'(-0.3 . -1.8) f-5
transparent
property will make an object be printed
in `invisible ink': the object is not printed, but all its other
behavior is retained. The object still takes space, it takes part in
collisions, and slurs, ties and beams can be attached to it.
The following example demonstrates how to connect different voices using ties. Normally ties only happen between notes of the same voice. By introducing a tie in a different voice, and blanking a stem in that voice, the tie appears to cross voices:
c4 << { \once \property Voice.Stem \set #'transparent = ##t b8~ b8 } \\ { b[ g8] } >>
padding
property for objects with
side-position-interface
can be set to increase distance between
symbols that are printed above or below notes. We only give an
example; a more elaborate explanation is in Constructing a tweak:
c2\fermata \property Voice.Script \set #'padding = #3 b2\fermata
More specific overrides are also possible. The notation manual discusses in depth how to figure out these statements for yourself, in Tuning output.
This page is for LilyPond-2.0.0 (stable-branch).