3.3.3 Engravers explained

Every mark on the printed output of a score produced by LilyPond is produced by an Engraver. Thus there is an engraver to print staves, one to print note heads, one for stems, one for beams, etc, etc. In total there are over 120 such engravers! Fortunately, for most scores it is not necessary to know about more than a few, and for simple scores you do not need to know about any.

Engravers live and operate in Contexts. Engravers such as the Metronome_mark_engraver, whose action and output apply to the score as a whole, operate in the highest level context – the Score context.

The Clef_engraver and Key_engraver are to be found in every Staff Context, as different staves may require different clefs and keys.

The Note_heads_engraver and Stem_engraver live in every Voice context, the lowest level context of all.

Each engraver processes the particular objects associated with its function, and maintains the properties that relate to that function. These properties, like the properties associated with contexts, may be modified to change the operation of the engraver or the appearance of those elements in the printed score.

Engravers all have compound names formed from words which describe their function. Just the first word is capitalized, and the remainder are joined to it with underscores. Thus the Staff_symbol_engraver is responsible for creating the lines of the staff, the Clef_engraver determines and sets the pitch reference point on the staff by drawing a clef symbol.

Here are some of the most common engravers together with their function. You will see it is usually easy to guess the function from the name, or vice versa.




Makes accidentals, cautionary and suggested accidentals


Engraves beams


Engraves clefs


Splits notes which cross bar lines


Creates hairpins and dynamic texts


Prevents line breaks if a musical element is still active


Creates the key signature


Engraves metronome marking


Engraves note heads


Engraves rests


Engraves the five (by default) lines of the staff


Creates stems and single-stem tremolos


Creates time signatures

We shall see later how the output of LilyPond can be changed by modifying the action of Engravers.

See also

Internals reference: Engravers and Performers.

Other languages: français, español, deutsch.

Learning Manual