You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 3: Fundamental concepts 61<br />
voices for its music, whereas the RH staff is created with a single music expression surrounded<br />
by curly brackets because it requires only one voice.)<br />
The \new command may also give a identifying name to the context to distinguish it from<br />
other contexts of the same type,<br />
\new type = id music-expression<br />
Note the distinction between the name of the context type, Staff, Voice, etc, and the<br />
identifying name of a particular instance of that type, which can be any sequence of letters<br />
invented by the user. Digits and spaces can also be used in the identifying name, but then it<br />
has to be placed in quotes, i.e. \new Staff = "MyStaff 1" music-expression. The identifying<br />
name is used to refer back to that particular instance of a context. We saw this in use in the<br />
section on lyrics, see Section 3.2.3 [Voices and vocals], page 52.<br />
See also<br />
Notation Reference: Section “Creating contexts” in Notation Reference.<br />
3.3.3 Engravers explained<br />
Every mark on the printed output of a score produced by <strong>LilyPond</strong> is produced by an Engraver.<br />
Thus there is an engraver to print staves, one to print note heads, one for stems, one for beams,<br />
etc, etc. In total there are over 120 such engravers! Fortunately, for most scores it is not<br />
necessary to know about more than a few, and for simple scores you do not need to know about<br />
any.<br />
Engravers live and operate in Contexts. Engravers such as the Metronome_mark_engraver,<br />
whose action and output apply to the score as a whole, operate in the highest level context –<br />
the Score context.<br />
The Clef_engraver and Key_engraver are to be found in every Staff Context, as different<br />
staves may require different clefs and keys.<br />
The Note_heads_engraver and Stem_engraver live in every Voice context, the lowest level<br />
context of all.<br />
Each engraver processes the particular objects associated with its function, and maintains<br />
the properties that relate to that function. These properties, like the properties associated with<br />
contexts, may be modified to change the operation of the engraver or the appearance of those<br />
elements in the printed score.<br />
Engravers all have compound names formed from words which describe their function. Just<br />
the first word is capitalized, and the remainder are joined to it with underscores. Thus the<br />
Staff_symbol_engraver is responsible for creating the lines of the staff, the Clef_engraver<br />
determines and sets the pitch reference point on the staff by drawing a clef symbol.<br />
Here are some of the most common engravers together with their function. You will see it is<br />
usually easy to guess the function from the name, or vice versa.<br />
Engraver Function<br />
Accidental engraver Makes accidentals, cautionary and suggested accidentals<br />
Beam engraver Engraves beams<br />
Clef engraver Engraves clefs<br />
Completion heads engraver Splits notes which cross bar lines<br />
New dynamic engraver Creates hairpins and dynamic texts<br />
Forbid line break engraver Prevents line breaks if a musical element is still active<br />
Key engraver Creates the key signature<br />
Metronome mark engraver Engraves metronome marking<br />
Note heads engraver Engraves note heads