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. For details, see the Contributors'
7 Guide, node Updating translation committishes..
12 @node implementing-notation
14 @unnumberedsec Music notation
16 Common music notation encompasses some 500 years of music. Its
17 applications range from monophonic melodies to monstruous counterpoint
18 for large orchestras. How can we get a grip on such a many-headed
19 beast? Our solution is to make a strict distinction between notation,
20 @emph{what} symbols to use, and engraving, @emph{where} to put
21 them. For tackling notation, we have broken up the problem into
22 digestible (and programmable) chunks: every type of symbol is handled
23 by a separate plugin. All plugins cooperate through the LilyPond
24 architecture. They are completely modular and independent, so each
25 can be developed and improved separately.
29 The most basic plug-in creates Note-heads:
31 @divClass{float-center}
32 @sourceimage{engraver-noteheads,,,.png}
35 This plug-in creates graphical objects from musical events. People
36 that put graphics to musical ideas are called copyists or engravers,
37 so by analogy, this plug-in is called @code{Note_head_engraver}.
41 The @code{Staff_symbol_engraver} generates the object
42 representing the staff lines.
44 @divClass{float-center}
45 @sourceimage{engraver-staff,,,.png}
50 The @code{Clef_engraver} tells @code{Note_head_engraver} how high
51 each head should be placed.
53 @divClass{float-center}
54 @sourceimage{engraver-clef,,,.png}
61 For the flags and stems we add a @code{Stem_engraver}:
63 @divClass{float-center}
64 @sourceimage{engraver-stem,,,.png}
67 This engraver is notified of any note head coming along. Every time
68 one (or more, for a chord) note head is seen, a stem object is
69 created, and attached to the note head.
73 Beams, slurs, accents are handled by separate engravers. Like the
74 @code{Stem_engraver}, they create objects and connect them to stems,
77 @divClass{float-center}
78 @sourceimage{engraver-slur,,,.png}
85 Accidentals, bar lines, time signature, and key signature each have a
89 @divClass{float-center}
90 @sourceimage{engraver-acc,,,.png}
93 The @code{Accidental_engraver} is the most complex plug-in: it has
94 to look at the key signature, note pitches, ties, and bar lines to
95 decide when to print accidentals.
101 @c @unnumberedsec Polyphonic notation
102 @heading Polyphonic notation
104 The system shown in the last section works well for monophonic music,
105 but what about polyphony? In polyphonic notation, many voices can
108 @divClass{float-center}
109 @sourceimage{engraver-final,,,.png}
112 In this situation, the accidentals and staff are shared, but the
113 stems, slurs, beams, etc. are private to each voice. Hence, engravers
114 should be grouped. The engravers for note head, stems, slurs, etc. go
115 into a group called "Voice context," while the engravers for key,
116 accidental, bar, etc. go into a group called "Staff context." In the
117 case of polyphony, a single Staff context contains more than one Voice
118 context. Similarly, more Staff contexts can be put into a single
121 @divClass{float-center}
122 @sourceimage{engraver-score,,,.png}
125 @divClass{float-right}
126 Next: @ref{engraving,The art of stamping}:
127 how @emph{did} they make hand-made music?