09.09.2013 Views

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hoofdstuk 4: Tweaking output 89<br />

These, then, are the main terms relating to objects which we shall use in this chapter.<br />

4.1.3 Naming conventions of objects and properties<br />

We met some object naming conventions previously, in Sectie 3.3 [Contexts and engravers],<br />

pagina 59. Here for reference is a list of the most common object and property types together<br />

with the conventions for naming them and a couple of examples of some real names. We have<br />

used ‘A’ to stand for any capitalized alphabetic character and ‘aaa’ to stand for any number of<br />

lower-case alphabetic characters. Other characters are used verbatim.<br />

Object/property type Naming convention Examples<br />

Contexts Aaaa or AaaaAaaaAaaa Staff, GrandStaff<br />

Layout Objects Aaaa or AaaaAaaaAaaa Slur, NoteHead<br />

Engravers Aaaa aaa engraver Clef engraver,<br />

Note heads engraver<br />

Interfaces aaa-aaa-interface grob-interface, breakaligned-interface<br />

Context Properties aaa or aaaAaaaAaaa alignAboveContext, skipBars<br />

Layout Object Properties aaa or aaa-aaa-aaa direction, beam-thickness<br />

As we shall see shortly, the properties of different types of object are modified by different<br />

commands, so it is useful to be able to recognize the types of objects and properties from their<br />

names.<br />

4.1.4 Tweaking methods<br />

The \override command<br />

We have already met the commands \set and \with, used to change the properties of contexts<br />

and to remove and add engravers, in Sectie 3.3.4 [Modifying context properties], pagina 63, and<br />

Sectie 3.3.5 [Adding and removing engravers], pagina 67. We must now introduce some more<br />

important commands.<br />

The command to change the properties of layout objects is \override. Because this command<br />

has to modify internal properties deep within <strong>LilyPond</strong> its syntax is not as simple as the<br />

commands you have used so far. It needs to know precisely which property of which object in<br />

which context has to be modified, and what its new value is to be. Let’s see how this is done.<br />

The general syntax of this command is:<br />

\override Context.LayoutObject.layout-property = #value<br />

This will set the property with the name layout-property of the layout object with the name<br />

LayoutObject, which is a member of the Context context, to the value value.<br />

The Context may be omitted (and usually is) when the required context is unambiguously<br />

implied and is one of lowest level contexts, i.e., Voice, ChordNames or Lyrics, and we shall omit<br />

it in many of the following examples. We shall see later when it must be specified.<br />

Later sections deal comprehensively with properties and their values, see Sectie 4.2.3 [Types<br />

of properties], pagina 98. But in this section we shall use just a few simple properties and values<br />

which are easily understood in order to illustrate the format and use of these commands.<br />

<strong>LilyPond</strong>’s primary expressions are musical items like notes, durations, and markups. More<br />

basic expressions like numbers, strings, and lists are processed in ‘Scheme mode’, which is invoked<br />

by prefixing the value with ‘#’. Although the values may sometimes have a valid representation<br />

in <strong>LilyPond</strong>’s musical mode, this manual will always use ‘#’ for their entry for the sake of<br />

consistency. For more information about Scheme mode, see Sectie “<strong>LilyPond</strong> Scheme syntax” in<br />

Uitbreidingen.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!