Node:Fine tuning layout, Next:, Previous:Setting variables, Up:Tutorial



Fine tuning layout

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
     

[picture of music]

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
     

[picture of music]

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:

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

Report errors to <bug-lilypond@gnu.org>.