Common music notation encompasses some 500 years of music. Its applications range from monophonic melodies to monstruous counterpoint for large orchestras. How can we get a grip on such a many-headed beast? Our solution is to make a strict distinction between notation, what symbols to use, and engraving, where to put them. For tackling notation, we have broken up the problem into digestible (and programmable) chunks: every type of symbol is handled by a separate plugin. All plugins cooperate through the LilyPond architecture. They are completely modular and independent, so each can be developed and improved separately.
- The most basic plug-in creates Note-heads:
This plug-in creates graphical objects from musical events. People that put graphics to musical ideas are called copyists or engravers, so by analogy, this plug-in is called Note_head_engraver.
- The Staff_symbol_engraver generates the object
representing the staff lines.
The Clef_engraver tells Note_head_engraver how high
each head should be placed.
For the flags and stems we add a Stem_engraver:
This engraver is notified of any note head coming along. Every time one (or more, for a chord) note head is seen, a stem object is created, and attached to the note head.
Beams, slurs, accents are handled by separate engravers. Like the
Stem_engraver, they create objects and connect them to stems,
note heads, etc.:
Accidentals, bar lines, time signature, and key signature each have a
The Accidental_engraver is the most complex plug-in: it has to look at the key signature, note pitches, ties, and bar lines to decide when to print accidentals.
Polyphonic notationThe system shown in the last section works well for monophonic music, but what about polyphony? In polyphonic notation, many voices can share a staff:
In this situation, the accidentals and staff are shared, but the stems, slurs, beams, etc. are private to each voice. Hence, engravers should be grouped. The engravers for note head, stems, slurs, etc. go into a group called "Voice context," while the engravers for key, accidental, bar, etc. go into a group called "Staff context." In the case of polyphony, a single Staff context contains more than one Voice context. Similarly, more Staff contexts can be put into a single Score context:
Next: The art of stamping:
how did they make hand-made music?