]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/nl/learning/fundamental.itely
fa011e9b5f6f3a8b61614ed14a62324fcf33bfba
[lilypond.git] / Documentation / nl / learning / fundamental.itely
1 \input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: nl -*-
2 @c This file is part of learning.tely
3 @ignore
4     Translation of GIT committish: 1b3da70d81938d19a2b107382bbe25a267cf130b
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  For details, see the Contributors'
8     Guide, node Updating translation committishes..
9 @end ignore
10
11
12 @c -*- coding: utf-8; mode: texinfo; -*-
13 @c \version "2.12.0"
14 @node Fundamental concepts
15 @chapter Fundamental concepts
16
17 @untranslated
18
19
20 @menu
21 * How LilyPond input files work::
22 * Voices contain music::
23 * Contexts and engravers::
24 * Extending the templates::
25 @end menu
26
27 @node How LilyPond input files work
28 @section How LilyPond input files work
29
30 @untranslated
31
32
33 @menu
34 * Introduction to the LilyPond file structure::
35 * Score is a (single) compound musical expression::
36 * Nesting music expressions::
37 * On the un-nestedness of brackets and ties::
38 @end menu
39
40 @node Introduction to the LilyPond file structure
41 @subsection Introduction to the LilyPond file structure
42
43 @untranslated
44
45
46 @c index input format
47 @c index file structure
48 @c index book
49 @c index score
50 @c ode{\score@{@}} command.  This is because LilyPond automatically
51 @c index implicit contexts
52 @c index contexts, implicit
53 @ref{Contexts and engravers}.
54 @c ode{\score} command, leaving the others to default.
55 @c index header
56 @c index layout
57 @c index midi
58 @c ode{\midi} -- are special: unlike many other commands which begin
59 @c ode{\header} is often placed above the @code{\score} command, as the
60 @c ode{\layout @{ @}} and @code{\midi @{@}}.  If these appear as
61 @c index scores, multiple
62 @c index book block, implicit
63 @c index implicit book block
64 @c ode{\book} command should be used to separate the different
65 @c ode{\book} block.
66 @c index layout block, effect of location
67 @c ode{\book} block in which it appears -- i.e., a @code{\layout}
68 @c index variables
69 @c ode{melody} (everything after the equals sign) and inserts it
70 @c ode{TimeKey},
71 @c ode{pianorighthand}, or @code{foofoobarbaz}.  For more details,
72 @node Score is a (single) compound musical expression
73 @subsection Score is a (single) compound musical expression
74
75 @untranslated
76
77
78 @c index score
79 @c index contents of a score block
80 @c index score block, contents of
81 @c index compound music expression
82 @c index music expression, compound
83 @quotation
84 @end quotation
85 @ref{Music expressions explained}.  In that section, we saw how to
86 @c ode{StaffGroup} for this ensemble, which simply groups a number
87 @c ode{\lyricmode}.  These are essential to tell LilyPond
88 @node Nesting music expressions
89 @subsection Nesting music expressions
90
91 @untranslated
92
93
94 @c index staves, temporary
95 @c index temporary staves
96 @c index ossias
97 @c index staff, positioning
98 @node On the un-nestedness of brackets and ties
99 @subsection On the un-nestedness of brackets and ties
100
101 @untranslated
102
103
104 @c index brackets, nesting
105 @c index bracket types
106 @c index brackets, enclosing vs. marking
107 @c attempt to force this onto a new page
108 @node Voices contain music
109 @section Voices contain music
110
111 @untranslated
112
113
114 @menu
115 * I'm hearing Voices::
116 * Explicitly instantiating voices::
117 * Voices and vocals::
118 @end menu
119
120 @node I'm hearing Voices
121 @subsection I'm hearing Voices
122
123 @untranslated
124
125
126 @c index polyphony
127 @c index layers
128 @c index multiple voices
129 @c index voices, multiple
130 @c index Voice context
131 @c index context, Voice
132 @c index simultaneous music
133 @c index music, simultaneous
134 @c index concurrent music
135 @c index music, concurrent
136 @c index voices vs. chords
137 @c index chords vs. voices
138 @c ode{\\}, to place them in separate voices.  Without these, the
139 @c index voices, naming
140 @c index voices crossing brackets
141 @c index slurs crossing brackets
142 @c index ties crossing brackest
143 @ref{Using variables for tweaks}.
144 @c index polyphony and relative note entry
145 @c index relative note entry and polyphony
146 @c ode{\relative @{ @}} block.  Each note is still calculated
147 @c ode{noteB} is relative to @code{noteA}                      @*
148 @c ode{noteC} is relative to @code{noteB}, not @code{noteA};   @*
149 @c ode{noteD} is relative to @code{noteB}, not @code{noteA} or
150 @c ode{noteC};                                                 @*
151 @c ode{noteE} is relative to @code{noteD}, not @code{noteA}.
152 @c The following should appear as music without code
153 @c The following should appear as music without code
154 @c The three voice styles should be defined in -init
155 @c index stem down
156 @c index voices and stem directions
157 @c index stem directions and voices
158 @c index stem up
159 @node Explicitly instantiating voices
160 @subsection Explicitly instantiating voices
161
162 @untranslated
163
164
165 @c index voice contexts, creating
166 @c ode{\voiceOne} ... @code{\voiceFour} to indicate the required
167 @c The following example should not display the code
168 @c index voices, reverting to single
169 @c index reverting to a single voice
170 @c ode{\voiceFour} make them point downwards.  These commands also
171 @c ode{\oneVoice}, @code{\voiceOne} and @code{voiceTwo} have on
172 @c index nesting music expressions
173 @c index nesting simultaneous constructs
174 @c index nesting voices
175 @c index voices, temporary
176 @c index voices, nesting
177 @c index spacing notes
178 @subsubheading Note columns
179 @c index note column
180 @c index note collisions
181 @c index collisions, notes
182 @c index shift commands
183 @c ode{\shiftOff} commands specify the degree to which notes and
184 @c ode{\shiftOnn} and @code{\shiftOnnn} define further shift
185 @node Voices and vocals
186 @subsection Voices and vocals
187
188 @untranslated
189
190
191 @c index Lyrics context, creating
192 @c index lyrics, linking to voice
193 @c index lyrics and beaming
194 @c index beaming and lyrics
195 @c ode{\autoBeamOff} to turn off the automatic beaming.
196 @c index vocal score structure
197 @c index choir staff
198 @c ode{\lyricmode} to ensure they are interpreted as lyrics
199 @c index hymn structure
200 @c index SATB structure
201 @c index vocal scores with multiple verses
202 @c index multiple vocal verses
203 @c index verses, multiple vocal
204 @c index verse and refrain
205 @c index book, example of using
206 @c ode{\score} blocks within an implicit @code{\book} block, as
207 @node Contexts and engravers
208 @section Contexts and engravers
209
210 @untranslated
211
212
213 @menu
214 * Contexts explained::
215 * Creating contexts::
216 * Engravers explained::
217 * Modifying context properties::
218 * Adding and removing engravers::
219 @end menu
220
221 @node Contexts explained
222 @subsection Contexts explained
223
224 @untranslated
225
226
227 @c index contexts explained
228 @quotation
229 @end quotation
230 @c ode{Score} and @code{Staff} contexts.
231 @c ode{Voice} contexts there are contexts which fit between
232 @c ode{PianoStaff} and @code{ChoirStaff} contexts.  There
233 @c ode{GregorianTranscriptionStaff}.
234 @node Creating contexts
235 @subsection Creating contexts
236
237 @untranslated
238
239
240 @c index new contexts
241 @c index creating contexts
242 @c index contexts, creating
243 @c ode{Staff} contexts may be left to be created automatically, but for
244 @c ode{Voice}).  This command creates a new context, and starts
245 @c ode{Staff} and @code{Voice} contexts in earlier sections, but
246 @c index contexts, naming
247 @c index naming contexts
248 @c ode{Staff}, @code{Voice}, etc, and the identifying name of a
249 @node Engravers explained
250 @subsection Engravers explained
251
252 @untranslated
253
254
255 @c index engravers
256 @c ode{Metronome_mark_engraver}, whose action and output apply to the
257 @c ode{Score} context.
258 @c The old Dynamic_engraver is deprecated. -jm
259 @node Modifying context properties
260 @subsection Modifying context properties
261
262 @untranslated
263
264
265 @c index context properties
266 @c index context properties, modifying
267 @c index modifying context properties
268 @c ode{\set} command.  This takes the form
269 @c ode{Staff} or @code{Voice}.  It may be omitted,
270 @c attempt to force this onto a new page
271 @c index properties operating in contexts
272 @c index setting properties within contexts
273 @c ode{instrumentName} clearly lives in the @code{Staff} context, since
274 @c ode{\set} command set the property @code{instrumentName} in the
275 @c ode{Voice} context to @qq{Alto}, but as LilyPond does not look
276 @c ode{\set} or @code{\unset} again.  Let's try changing the
277 @c ode{##t} and @code{##f}, with two hash signs.  A text property
278 @subsubheading Setting context properties with @code{\with}
279 @c index context properties, setting with \with
280 @c ode{\with @{ .. @}} block in which the property values are
281 @c ode{\set} and returned to their default value with @code{\unset}.
282 @c index fontSize, default and setting
283 @c ode{\unset fontSize} command.
284 @subsubheading Setting context properties with @code{\context}
285 @c index context properties, setting with \context
286 @c ode{\with} block, introduced above.  It is placed in a
287 @c ode{\context} block within a @code{\layout} block.  Each
288 @c ode{\context} block will affect all contexts of the type specified
289 @c ode{\layout} block appears.  Here is a example to show the format:
290 @c ode{\set} commands embedded in music statements.
291 @c FIXME
292 @c uncomment when backslash-node-name issue is resolved -pm
293 @c @ruser{The set command}.
294 @node Adding and removing engravers
295 @subsection Adding and removing engravers
296
297 @untranslated
298
299
300 @c index engravers, adding
301 @c index adding engravers
302 @c index engravers, removing
303 @c index removing engravers
304 @subsubheading Changing a single context
305 @c ode{\with} command placed immediately after the context creation
306 @c index ambitus engraver
307 @c ode{\consists @var{Engraver_name}},
308 @c ode{Ambitus_engraver}, which is not normally included in any
309 @c ode{Staff} context, it calculates the range from all
310 @subsubheading Changing all contexts of the same type
311 @c ode{\set} command in a @code{\context} block in the
312 @node Extending the templates
313 @section Extending the templates
314
315 @untranslated
316
317
318 @menu
319 * Soprano and cello::
320 * Four-part SATB vocal score::
321 * Building a score from scratch::
322 * Saving typing with variables and functions::
323 * Scores and parts::
324 @end menu
325
326 @node Soprano and cello
327 @subsection Soprano and cello
328
329 @untranslated
330
331
332 @c index template, modifying
333 @c index modifying templates
334 @c ode{melody} section.  We don't want two @code{\score} sections
335 @c ode{text} to be @code{sopranoLyrics}.  Remember to rename both
336 @c ode{melody = \relative c' @{ } part) and the name's use (in the
337 @c ode{\score} section).
338 @c ode{>>} around the music -- that tells LilyPond that there's
339 @c Indentation in this example is deliberately poor
340 @node Four-part SATB vocal score
341 @subsection Four-part SATB vocal score
342
343 @untranslated
344
345
346 @c index template, SATB
347 @c index SATB template
348 @c The following should appear as music without code
349 @c ode{\voiceXXX} commands should be removed.  We also need to specify
350 @node Building a score from scratch
351 @subsection Building a score from scratch
352
353 @untranslated
354
355
356 @c index template, writing your own
357 @c index example of writing a score
358 @c index writing a score, example
359 @c index score, example of writing
360 @c ode{<< .. >>} for the manual two staff and the pedal organ staff,
361 @c ode{@{ .. @}} in case your music is coded in several variables
362 @c ode{\voiceOne} and @code{\voiceTwo}, and enter the time signature
363 @node Saving typing with variables and functions
364 @subsection Saving typing with variables and functions
365
366 @untranslated
367
368
369 @c index variables
370 @c index variables
371 @c TODO Avoid padtext - not needed with skylining
372 @c TODO Replace the following with a better example  -td
373 @c Skylining handles this correctly without padText
374 @c ode{padtext=}).
375 @node Scores and parts
376 @subsection Scores and parts
377
378 @untranslated
379
380
381 @c ode{\transpose f@tie{}c'} indicates that the argument, being
382 @c ode{\hornNotes}, should be transposed by a fifth upwards.  Sounding
383 @c ode{f} is denoted by notated @code{c'}, which corresponds with the
384 @c ode{Score} context to true (@code{##t}).  Prepending the rest and
385
386 @c -- SKELETON FILE --