[ << Fundamental concepts ] | [Top][Contents][Index] | [ Tweaking output >> ] |
[ < Creating contexts ] | [ Up : Contexts and engravers ] | [ Modifying context properties > ] |
4.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 140 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 that
describe their function. Just the first word is capitalized,
and the remaining words 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.
Engraver Function Accidental_engraver
makes normal, cautionary, and suggested accidentals Beam_engraver
engraves beams Clef_engraver
engraves clefs Completion_heads_engraver
splits notes that cross bar lines Dynamic_engraver
creates hairpins and dynamic texts Forbid_line_break_engraver
prevents line breaks if a musical element is still active Key_engraver
creates the key signature Metronome_mark_engraver
engraves metronome marking Note_heads_engraver
engraves note heads Rest_engraver
engraves rests Staff_symbol_engraver
engraves the five (by default) lines of the staff Stem_engraver
creates stems and single-stem tremolos Time_signature_engraver
creates time signatures
We shall see later how the output of LilyPond can be changed by modifying the action of engravers.
参见
Internals reference: Engravers and Performers.
[ << Fundamental concepts ] | [Top][Contents][Index] | [ Tweaking output >> ] |
[ < Creating contexts ] | [ Up : Contexts and engravers ] | [ Modifying context properties > ] |