]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/learning/templates.itely
Issue 4424: Add Solo voice to built-in satb.ly template
[lilypond.git] / Documentation / learning / templates.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
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 @c \version "2.19.2"
12
13 @node Templates
14 @appendix Templates
15
16 This section of the manual contains templates with the LilyPond score
17 already set up for you.  Just add notes, run LilyPond, and enjoy
18 beautiful printed scores!
19
20 @menu
21 * Built-in templates::
22 * Single staff templates::
23 * Piano templates::
24 * String quartet templates::
25 * Vocal ensembles templates::
26 * Orchestral templates::
27 * Ancient notation templates::
28 * Other templates::
29 @end menu
30
31
32 @node Built-in templates
33 @appendixsec Built-in templates
34
35 A template, suitable for a range of choral music, is built into
36 LilyPond.  This may be used to create simple choral music, with or
37 without piano accompaniment, in two or four staves.  Unlike other
38 templates, this template is @q{built-in}, which means it does not
39 need to be copied and edited:  instead it is simply 
40 @code{\include}'d in the input file.
41
42 @warning {Unlike most included files, this built-in template must be
43 @code{\include}'d at the @emph{end} of the input file.}
44
45 The required music expressions are entered by defining values for
46 specific variables.  These definition must come before the
47 @code{\include}'d file.
48
49 The music may be set out with one or two voices per staff by setting
50 @code{TwoVoicesPerStaff} to @code{##f} or @code{##t} respectively.
51
52 Here's the complete input file for producing a full four-part SATB
53 arrangement with individual lyrics and piano accompaniment:
54
55 @lilypond[verbatim, quote]
56   SopranoMusic = \relative { a'4\f a8 a a4 a }
57   SopranoLyrics = \lyricmode { Sop -- ra -- no ly -- rics }
58   AltoMusic = \relative { d'4\f d d d }
59   AltoLyrics = \lyricmode { Al -- to ly -- rics }
60   TenorMusic = \relative { a4\p a a a }
61   TenorLyrics = \lyricmode { Te -- nor ly -- rics }
62   BassMusic = \relative { c2\p c4 c }
63   BassLyrics = \lyricmode { Bass ly -- rics }
64   PianoRHMusic = \relative { c' e g c }
65   PianoDynamics = { s2\mp s4 s4 }
66   PianoLHMusic = \relative { c e g c }
67   \include "satb.ly"
68 @end lilypond
69
70 The same input can be used to produce a score with two voices
71 per staff just by setting @code{TwoVoicesPerStaff} to @code{##t}.
72 Again, each voice has individual lyrics.
73
74
75 @lilypond[verbatim, quote]
76   SopranoMusic = \relative { a'4\f a8 a a4 a }
77   SopranoLyrics = \lyricmode { Sop -- ra -- no ly -- rics }
78   AltoMusic = \relative { d'4\f d d d }
79   AltoLyrics = \lyricmode { Al -- to ly -- rics }
80   TenorMusic = \relative { a4\p a a a }
81   TenorLyrics = \lyricmode { Te -- nor ly -- rics }
82   BassMusic = \relative { c2\p c4 c }
83   BassLyrics = \lyricmode { Bass ly -- rics }
84   PianoRHMusic = \relative { c' e g c }
85   PianoDynamics = { s2\mp s4 s4 }
86   PianoLHMusic = \relative { c e g c }
87   TwoVoicesPerStaff = ##t
88   \include "satb.ly"
89 @end lilypond
90
91 When @code{TwoVoicesPerStaff} is set to false or allowed to default,
92 any of the music variables may be omitted to produce arrangements
93 with fewer voices.  Here, for example, is how the input file for a
94 Soprano/Bass duet might be written:
95
96 @lilypond[verbatim,quote]
97   SopranoMusic = \relative { c'' c c c }
98   SopranoLyrics = \lyricmode { High voice ly -- rics }
99   BassMusic = \relative { a a a a }
100   BassLyrics = \lyricmode { Low voice ly -- rics }
101   \include "satb.ly"
102 @end lilypond
103
104 A second verse or alternative lyrics may be added to each of the
105 parts:
106
107 @lilypond[verbatim, quote]
108   SopranoMusic = \relative { a'4 a a a }
109   SopranoLyricsOne = \lyricmode {
110     \set stanza = "1."
111     Words to verse one
112   }
113   SopranoLyricsTwo = \lyricmode {
114     \set stanza = "2."
115     Words to verse two
116   }
117   \include "satb.ly"
118 @end lilypond
119
120 When the lyrics and rhythms are the same for every part, the vocal
121 music is best arranged on two staves with two voices in each.  Up to
122 nine verses may be provided.  Here's an unaccompanied example with
123 just three verses.
124
125 @lilypond[verbatim, quote]
126   SopranoMusic = \relative { a' a a a }
127   AltoMusic = \relative { f' f f f }
128   VerseOne = \lyricmode {
129     \set stanza = "1."
130     Words to verse one
131   }
132   VerseTwo = \lyricmode {
133     \set stanza = "2."
134     Words to verse two
135   }
136   VerseThree = \lyricmode {
137     \set stanza = "3."
138     Words to verse three
139   }
140   TenorMusic = \relative { a a a a }
141   BassMusic = \relative { f f f f }
142   TwoVoicesPerStaff = ##t
143   \include "satb.ly"
144 @end lilypond
145
146 Other variables may be given values.  The key signature and
147 the time signature may be changed from the default:
148
149 @lilypond[verbatim, quote]
150   Key = \key a \major
151   Time = {
152     \time 5/4
153     \tempo "Allegro" 4 = 144
154   }
155   SopranoMusic = \relative { gis' gis gis gis gis }
156   AltoMusic = \relative { cis' cis cis cis cis }
157   VerseOne = \lyricmode { Words to this du -- et }
158   TwoVoicesPerStaff = ##t
159   \include "satb.ly"
160 @end lilypond
161
162 The instrument names and/or the short instrument names may be
163 changed:
164
165 @lilypond[verbatim,quote]
166   SopranoMusic = \relative { c'' c c c }
167   SopranoLyrics = \lyricmode { High voice ly -- rics }
168   SopranoInstrumentName = "Soprano 1"
169   SopranoShortInstrumentName = "S1"
170   AltoMusic = \relative { a' a a a }
171   AltoLyrics = \lyricmode { Low voice ly -- rics }
172   AltoInstrumentName = "Soprano 2"
173   AltoShortInstrumentName = "S2"
174   \include "satb.ly"
175 @end lilypond
176
177 A descant may be added by defining values for the variable
178 @code{DescantMusic} and descant lyrics may be provided by defining
179 values for @code{DescantLyrics}.  In a similar way a solo part may be
180 added above the grouped choir staves by defining values for
181 @code{SoloMusic} and @code{SoloLyrics}.
182
183 @code{\header} and @code{\paper} blocks may be added as normal.
184 A @code{\layout} block may be provided as the value of the
185 @code{Layout} variable:
186
187 @example
188 Layout = \layout @{ ... @}
189 @end example
190
191 The complete set of variables which may be changed can be seen by
192 examining the file @file{ly/satb.ly}.
193
194 @seealso
195 Learning Manual:
196 @ref{Organizing pieces with variables},
197 @ref{Vocal ensembles templates},
198 @ref{Extending the templates}.
199
200 @knownissues
201 More complex arrangements of SATB choral music are not possible with
202 these simple built-in templates.
203
204
205 @node Single staff templates
206 @appendixsec Single staff templates
207
208 @menu
209 * Notes only::
210 * Notes and lyrics::
211 * Notes and chords::
212 * Notes lyrics and chords::
213 @end menu
214
215 @node Notes only
216 @appendixsubsec Notes only
217
218 @lilypondfile[verbatim,quote,ragged-right,texidoc,addversion]
219 {single-staff-template-with-only-notes.ly}
220
221 @node Notes and lyrics
222 @appendixsubsec Notes and lyrics
223
224 @lilypondfile[verbatim,quote,ragged-right,texidoc,addversion]
225 {single-staff-template-with-notes-and-lyrics.ly}
226
227 @node Notes and chords
228 @appendixsubsec Notes and chords
229
230 @lilypondfile[verbatim,quote,ragged-right,texidoc]
231 {single-staff-template-with-notes-and-chords.ly}
232
233 @node Notes lyrics and chords
234 @appendixsubsec Notes, lyrics, and chords
235
236 @lilypondfile[verbatim,quote,ragged-right,texidoc]
237 {single-staff-template-with-notes,-lyrics,-and-chords.ly}
238
239
240 @node Piano templates
241 @appendixsec Piano templates
242
243 @menu
244 * Solo piano::
245 * Piano and melody with lyrics::
246 * Piano centered lyrics::
247 @end menu
248
249 @node Solo piano
250 @appendixsubsec Solo piano
251
252 @lilypondfile[verbatim,quote,ragged-right,texidoc]
253 {piano-template-simple.ly}
254
255 @node Piano and melody with lyrics
256 @appendixsubsec Piano and melody with lyrics
257
258 @lilypondfile[verbatim,quote,ragged-right,texidoc]
259 {piano-template-with-melody-and-lyrics.ly}
260
261 @node Piano centered lyrics
262 @appendixsubsec Piano centered lyrics
263
264 @lilypondfile[verbatim,quote,ragged-right,texidoc]
265 {piano-template-with-centered-lyrics.ly}
266
267
268 @node String quartet templates
269 @appendixsec String quartet templates
270
271 @menu
272 * String quartet::
273 * String quartet parts::
274 @end menu
275
276 @node String quartet
277 @appendixsubsec String quartet
278
279 @lilypondfile[verbatim,quote,ragged-right,texidoc]
280 {string-quartet-template-simple.ly}
281
282 @node String quartet parts
283 @appendixsubsec String quartet parts
284
285 @lilypondfile[verbatim,quote,ragged-right,texidoc]
286 {string-quartet-template-with-separate-parts.ly}
287
288
289 @node Vocal ensembles templates
290 @appendixsec Vocal ensembles templates
291
292 The templates shown below should be copied into your score and edited
293 there.  If you have a relatively simple SATB layout you may prefer to
294 use the built-in templates, which can simply be @code{\include}'d, see
295 @ref{Built-in templates}.
296
297 @menu
298 * SATB vocal score::
299 * SATB vocal score and automatic piano reduction::
300 * SATB with aligned contexts::
301 * SATB on four staves::
302 * Solo verse and two-part refrain::
303 * Hymn tunes::
304 * Psalms::
305 @end menu
306
307 @node SATB vocal score
308 @appendixsubsec SATB vocal score
309
310 @lilypondfile[verbatim,quote,ragged-right,texidoc]
311 {vocal-ensemble-template.ly}
312
313 @node SATB vocal score and automatic piano reduction
314 @appendixsubsec SATB vocal score and automatic piano reduction
315
316 @lilypondfile[verbatim,quote,ragged-right,texidoc]
317 {vocal-ensemble-template-with-automatic-piano-reduction.ly}
318
319 @node SATB with aligned contexts
320 @appendixsubsec SATB with aligned contexts
321
322 @lilypondfile[verbatim,quote,ragged-right,texidoc]
323 {vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly}
324
325 @node SATB on four staves
326 @appendixsubsec SATB on four staves
327
328 @lilypondfile[verbatim,quote,ragged-right,texidoc]
329 {satb-choir-template---four-staves.ly}
330
331 @node Solo verse and two-part refrain
332 @appendixsubsec Solo verse and two-part refrain
333
334 @lilypondfile[verbatim,quote,ragged-right,texidoc]
335 {vocal-ensemble-template-with-verse-and-refrain.ly}
336
337 @node Hymn tunes
338 @appendixsubsec Hymn tunes
339
340 @lilypondfile[verbatim,quote,ragged-right,texidoc]
341 {hymn-template.ly}
342
343 @node Psalms
344 @appendixsubsec Psalms
345
346 @lilypondfile[verbatim,quote,ragged-right,texidoc]
347 {anglican-psalm-template.ly}
348
349
350 @node Orchestral templates
351 @appendixsec Orchestral templates
352
353 @menu
354 * Orchestra choir and piano::
355 @end menu
356
357 @node Orchestra choir and piano
358 @appendixsubsec Orchestra, choir and piano
359
360 @lilypondfile[verbatim,quote,ragged-right,texidoc]
361 {orchestra,-choir-and-piano-template.ly}
362
363
364 @node Ancient notation templates
365 @appendixsec Ancient notation templates
366
367 @menu
368 * Transcription of mensural music::
369 * Gregorian transcription template::
370 @end menu
371
372 @node Transcription of mensural music
373 @appendixsubsec Transcription of mensural music
374
375 @lilypondfile[verbatim,quote,ragged-right,texidoc]
376 {incipit.ly}
377
378 @node Gregorian transcription template
379 @appendixsubsec Gregorian transcription template
380
381 @lilypondfile[verbatim,quote,ragged-right,texidoc]
382 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
383
384
385 @node Other templates
386 @appendixsec Other templates
387
388 @menu
389 * Jazz combo::
390 @end menu
391
392 @node Jazz combo
393 @appendixsubsec Jazz combo
394
395 @lilypondfile[verbatim,quote,ragged-right,texidoc]
396 {jazz-combo-template.ly}
397
398
399
400
401 @ignore
402 This isn't very useful, and only duplicates material in
403 "global issues".  And if this info changes, this section often
404 gets forgotten.
405
406 @no de Other templates
407 @se ction Other templates
408 @su bsection All headers
409
410 This template displays all available headers.  Some of them are only
411 used in the Mutopia project; they don't affect the printed output at
412 all.  They are used if you want the piece to be listed with different
413 information in the Mutopia database than you wish to have printed on the
414 music.  For example, Mutopia lists the composer of the famous D major
415 violin concerto as TchaikovskyPI, whereas perhaps you wish to print
416 "Petr Tchaikowski" on your music.
417
418 @ The `line-width' is for \header.
419 @li lypond[quote,verbatim,ragged-right,line-width]
420 \version "2.19.2"
421 \header {
422   dedication = "dedication"
423   title = "Title"
424   subtitle = "Subtitle"
425   subsubtitle = "Subsubtitle"
426   composer = "Composer (xxxx-yyyy)"
427   opus = "Opus 0"
428   piece = "Piece I"
429   meter = "meter"
430   instrument = "Instrument"
431   arranger = "Arranger"
432   poet = "Poet"
433   texttranslator = "Translator"
434   copyright = "public domain"
435
436   % These are headers used by the Mutopia Project
437   % http://www.mutopiaproject.org/
438   mutopiatitle = ""
439   mutopiacomposer = ""
440   mutopiapoet = ""
441   mutopiainstrument = ""
442   date = "composer's dates"
443   source = "urtext "
444   maintainer = "your name here"
445   maintainerEmail = "your email here"
446   maintainerWeb = "your home page"
447   lastupdated = "2004/Aug/26"
448 }
449
450 \score {
451   { c'4 }
452   \header {
453     piece = "piece1"
454     opus = "opus1"
455   }
456 }
457
458 \score {
459   { c'4 }
460   \header {
461     piece = "piece2"
462     opus = "opus2"
463   }
464 }
465 @end lilypond
466 @end ignore
467
468
469