]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/automated-engraving/implementing-notation.itexi
Web-es: fix some links
[lilypond.git] / Documentation / automated-engraving / implementing-notation.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
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..
8 @end ignore
9
10
11
12 @node implementing-notation 
13
14 @unnumberedsec Music notation
15
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.
26
27 @itemize
28 @item
29 The most basic plug-in creates Note-heads:
30
31 @divClass{float-center}
32 @sourceimage{engraver-noteheads,,,.png}
33 @divEnd
34
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}.
38
39
40 @item
41  The @code{Staff_symbol_engraver} generates the object
42 representing the staff lines.
43
44 @divClass{float-center}
45 @sourceimage{engraver-staff,,,.png}
46 @divEnd
47
48 @item
49
50  The @code{Clef_engraver} tells @code{Note_head_engraver} how high
51 each head should be placed.
52
53 @divClass{float-center}
54 @sourceimage{engraver-clef,,,.png}
55 @divEnd
56
57
58
59 @item
60
61 For the flags and stems we add  a @code{Stem_engraver}:
62
63 @divClass{float-center}
64 @sourceimage{engraver-stem,,,.png}
65 @divEnd
66
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.
70
71 @item
72
73 Beams, slurs, accents are handled by separate engravers. Like the
74 @code{Stem_engraver}, they create objects and connect them to stems,
75 note heads, etc.:
76
77 @divClass{float-center}
78 @sourceimage{engraver-slur,,,.png}
79 @divEnd
80
81
82
83 @item
84
85 Accidentals, bar lines, time signature, and key signature each have a
86 separate
87 engraver.
88
89 @divClass{float-center}
90 @sourceimage{engraver-acc,,,.png}
91 @divEnd
92
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.
96
97
98 @end itemize
99
100
101 @c @unnumberedsec  Polyphonic notation
102 @heading  Polyphonic notation
103
104 The system shown in the last section works well for monophonic music,
105 but what about polyphony?  In polyphonic notation, many voices can
106 share a staff:
107
108 @divClass{float-center}
109 @sourceimage{engraver-final,,,.png}
110 @divEnd
111
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
119 Score context:
120
121 @divClass{float-center}
122 @sourceimage{engraver-score,,,.png}
123 @divEnd
124
125 @divClass{float-right}
126 Next: @ref{engraving,The art of stamping}:
127 how @emph{did} they make hand-made music?
128 @divEnd