1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
11 @node implementing-notation
13 @unnumberedsec Music notation
15 Common music notation encompasses some 500 years of music. Its
16 applications range from monophonic melodies to monstruous counterpoint
17 for large orchestras. How can we get a grip on such a many-headed
18 beast? Our solution is to make a strict distinction between notation,
19 @emph{what} symbols to use, and engraving, @emph{where} to put
20 them. For tackling notation, we have broken up the problem into
21 digestible (and programmable) chunks: every type of symbol is handled
22 by a separate plugin. All plugins cooperate through the LilyPond
23 architecture. They are completely modular and independent, so each
24 can be developed and improved separately.
28 The most basic plug-in creates Note-heads:
30 @divClass{float-center}
31 @sourceimage{engraver-noteheads,,,.png}
34 This plug-in creates graphical objects from musical events. People
35 that put graphics to musical ideas are called copyists or engravers,
36 so by analogy, this plug-in is called @code{Note_head_engraver}.
40 The @code{Staff_symbol_engraver} generates the object
41 representing the staff lines.
43 @divClass{float-center}
44 @sourceimage{engraver-staff,,,.png}
49 The @code{Clef_engraver} tells @code{Note_head_engraver} how high
50 each head should be placed.
52 @divClass{float-center}
53 @sourceimage{engraver-clef,,,.png}
60 For the flags and stems we add a @code{Stem_engraver}:
62 @divClass{float-center}
63 @sourceimage{engraver-stem,,,.png}
66 This engraver is notified of any note head coming along. Every time
67 one (or more, for a chord) note head is seen, a stem object is
68 created, and attached to the note head.
72 Beams, slurs, accents are handled by separate engravers. Like the
73 @code{Stem_engraver}, they create objects and connect them to stems,
76 @divClass{float-center}
77 @sourceimage{engraver-slur,,,.png}
84 Accidentals, bar lines, time signature, and key signature each have a
88 @divClass{float-center}
89 @sourceimage{engraver-acc,,,.png}
92 The @code{Accidental_engraver} is the most complex plug-in: it has
93 to look at the key signature, note pitches, ties, and bar lines to
94 decide when to print accidentals.
100 @c @unnumberedsec Polyphonic notation
101 @heading Polyphonic notation
103 The system shown in the last section works well for monophonic music,
104 but what about polyphony? In polyphonic notation, many voices can
107 @divClass{float-center}
108 @sourceimage{engraver-final,,,.png}
111 In this situation, the accidentals and staff are shared, but the
112 stems, slurs, beams, etc. are private to each voice. Hence, engravers
113 should be grouped. The engravers for note head, stems, slurs, etc. go
114 into a group called "Voice context," while the engravers for key,
115 accidental, bar, etc. go into a group called "Staff context." In the
116 case of polyphony, a single Staff context contains more than one Voice
117 context. Similarly, more Staff contexts can be put into a single
120 @divClass{float-center}
121 @sourceimage{engraver-score,,,.png}
124 @divClass{float-right}
125 Next: @ref{engraving,The art of stamping}:
126 how @emph{did} they make hand-made music?