]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/es/user/templates.itely
028cf2736e6506a2500b23263ee51ca7bcf917ae
[lilypond.git] / Documentation / es / user / templates.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
3 @ignore
4     Translation of GIT committish: 7cc6b12897031c450e3399d59cdb22ca9df4fd8c
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c \version "2.11.51"
11
12 @node Templates
13 @appendix Templates
14
15 Esta sección del manual contiene plantillas con la partitura de LilyPond
16 ya preparada.  Sólo tiene que escribir las notas, lanzar LilyPond y ¡disfrutar de
17 unas hermosas partituras impresas!
18
19 @c bad node name for ancient notation to avoid confict
20 @menu
21 * Single staff::                
22 * Piano templates::             
23 * String quartet::              
24 * Vocal ensembles::             
25 * Ancient notation templates::  
26 * Jazz combo::                  
27 * lilypond-book templates::     
28 @end menu
29
30
31 @node Single staff
32 @appendixsec Single staff
33 @appendixsubsec Notes only
34
35 El primer ejemplo le ofrece un pentagrama con notas, apropiado para un instrumento
36 solista o un fragmento melódico.  Córtelo y péguelo en un archivo,
37 escriba las notas y ¡ha terminado!
38
39 @lilypond[quote,verbatim,ragged-right]
40 \version "2.11.51"
41 melody = \relative c' {
42    \clef treble
43    \key c \major
44    \time 4/4
45
46    a4 b c d
47 }
48
49 \score {
50    \new Staff \melody
51    \layout { }
52    \midi {}
53 }
54 @end lilypond
55
56 @appendixsubsec Notes and lyrics
57
58 El siguiente ejemplo es una demostración de una sencilla melodía con letra.  Corte y
59 pegue, escriba las notas y luego el texto de la letra.  Este ejemplo desactiva
60 el barrado de figuras automático, lo que es frecuente para las partes vocales.  Si quiere usar el
61 barrado automático, tendrá que cambiar o convertir en un comentario la línea
62 correspondiente.
63
64 @lilypond[quote,verbatim,ragged-right]
65 \version "2.11.51"
66 melody = \relative c' {
67    \clef treble
68    \key c \major
69    \time 4/4
70
71    a4 b c d
72 }
73
74 text = \lyricmode {
75    Aaa Bee Cee Dee
76 }
77
78 \score{
79    <<
80       \new Voice = "one" {
81          \autoBeamOff
82          \melody
83       }
84       \new Lyrics \lyricsto "one" \text
85    >>
86    \layout { }
87    \midi { }
88 }
89 @end lilypond
90
91 @appendixsubsec Notes and chords
92
93 ¿Quiere preparar una «lead sheet» u hoja guía de una canción con acordes?  ¡No busque más!
94
95 @lilypond[quote,verbatim,ragged-right]
96 \version "2.11.51"
97 melody = \relative c' {
98    \clef treble
99    \key c \major
100    \time 4/4
101
102    f4 e8[ c] d4 g |
103    a2 ~ a2 |
104 }
105
106 harmonies = \chordmode {
107    c4:m f:min7 g:maj c:aug d2:dim b:sus
108 }
109
110 \score {
111    <<
112       \new ChordNames {
113          \set chordChanges = ##t
114          \harmonies
115       }
116    \new Staff \melody
117    >>
118
119    \layout{ }
120    \midi { }
121 }
122 @end lilypond
123
124 @appendixsubsec Notes, lyrics, and chords.
125
126 Esta plantilla le permite preparar una canción con melodía, letra y acordes.
127
128 @lilypond[quote,verbatim,ragged-right]
129 \version "2.11.51"
130 melody = \relative c' {
131    \clef treble
132    \key c \major
133    \time 4/4
134
135    a b c d
136 }
137
138 text = \lyricmode {
139    Aaa Bee Cee Dee
140 }
141
142 harmonies = \chordmode {
143    a2 c2
144 }
145
146 \score {
147    <<
148       \new ChordNames {
149          \set chordChanges = ##t
150          \harmonies
151       }
152    \new Voice = "one" {
153       \autoBeamOff
154       \melody
155    }
156    \new Lyrics \lyricsto "one" \text
157    >>
158    \layout { }
159    \midi { }
160 }
161 @end lilypond
162
163 @node Piano templates
164 @appendixsec Piano templates
165 @appendixsubsec Solo piano
166
167 He aquí un sencillo sistema de piano.
168
169 @lilypond[quote,verbatim,ragged-right]
170 \version "2.11.51"
171 upper = \relative c'' {
172    \clef treble
173    \key c \major
174    \time 4/4
175
176    a b c d
177 }
178
179 lower = \relative c {
180    \clef bass
181    \key c \major
182    \time 4/4
183
184    a2 c
185 }
186
187 \score {
188    \new PianoStaff <<
189       \set PianoStaff.instrumentName = "Piano  "
190       \new Staff = "upper" \upper
191       \new Staff = "lower" \lower
192    >>
193    \layout { }
194    \midi { }
195 }
196 @end lilypond
197
198 @appendixsubsec Piano and melody with lyrics
199
200 Aquí tenemos el típico formato de canción: un pentagrama con la melodía y la letra, y debajo el
201 acompañamiento de piano.
202
203 @lilypond[quote,verbatim,ragged-right]
204 \version "2.11.51"
205 melody = \relative c'' {
206    \clef treble
207    \key c \major
208    \time 4/4
209
210    a b c d
211 }
212
213 text = \lyricmode {
214    Aaa Bee Cee Dee
215 }
216
217 upper = \relative c'' {
218    \clef treble
219    \key c \major
220    \time 4/4
221
222    a b c d
223 }
224
225 lower = \relative c {
226    \clef bass
227    \key c \major
228    \time 4/4
229
230    a2 c
231 }
232
233 \score {
234    <<
235       \new Voice = "mel" {
236           \autoBeamOff
237           \melody
238       }
239       \new Lyrics \lyricsto mel \text
240
241       \new PianoStaff <<
242          \new Staff = "upper" \upper
243          \new Staff = "lower" \lower
244       >>
245    >>
246    \layout {
247       \context { \RemoveEmptyStaffContext }
248    }
249    \midi { }
250 }
251 @end lilypond
252
253
254 @appendixsubsec Piano centered lyrics
255
256 En lugar de tener un pentagrama dedicado a la melodía y la letra puede colocar
257 la letra en medio de los pentagramas del piano (y omitir el pentagrama separado para la melodía).
258
259 @lilypond[quote,verbatim,ragged-right]
260 \version "2.11.51"
261 upper = \relative c'' {
262    \clef treble
263    \key c \major
264    \time 4/4
265
266    a b c d
267 }
268
269 lower = \relative c {
270    \clef bass
271    \key c \major
272    \time 4/4
273
274    a2 c
275 }
276
277 text = \lyricmode {
278    Aaa Bee Cee Dee
279 }
280
281 \score {
282   \new GrandStaff <<
283     \new Staff = upper { \new Voice = "singer" \upper }
284     \new Lyrics \lyricsto "singer" \text
285     \new Staff = lower {
286       \clef bass
287       \lower
288     }
289   >>
290   \layout {
291     \context { \GrandStaff \accepts "Lyrics" }
292     \context { \Lyrics \consists "Bar_engraver" }
293   }
294   \midi { }
295 }
296 @end lilypond
297
298
299 @appendixsubsec Piano centered dynamics
300
301 Muchas partituras de piano tienen las indicaciones dinámicas centradas entre los dos
302 pentagramas.  La realización de esto necesita un poco de trucaje, pero
303 ya que la plantilla está aquí mismo, no tiene que hacer el trucaje
304 usted mismo.
305
306 @lilypond[quote,verbatim,ragged-right]
307 \version "2.11.51"
308 upper = \relative c'' {
309   \clef treble
310   \key c \major
311   \time 4/4
312
313   a b c d
314 }
315
316 lower = \relative c {
317   \clef bass
318   \key c \major
319   \time 4/4
320
321   a2 c
322 }
323
324 dynamics = {
325   s2\fff\> s4
326   s\!\pp
327 }
328
329 pedal = {
330   s2\sustainOn s2\sustainOff
331 }
332
333 \score {
334   \new PianoStaff <<
335     \new Staff = "upper" \upper
336     \new Dynamics = "dynamics" \dynamics
337     \new Staff = "lower" <<
338       \clef bass
339       \lower
340     >>
341     \new Dynamics = "pedal" \pedal
342   >>
343   \layout {
344     \context {
345       \type "Engraver_group"
346       \name Dynamics
347       \alias Voice % So that \cresc works, for example.
348       \consists "Output_property_engraver"
349
350       \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
351       \override DynamicLineSpanner #'Y-offset = #0
352       pedalSustainStrings = #'("Ped." "*Ped." "*")
353       pedalUnaCordaStrings = #'("una corda" "" "tre corde")
354
355       \consists "Piano_pedal_engraver"
356       \consists "Script_engraver"
357       \consists "Dynamic_engraver"
358       \consists "Text_engraver"
359
360       \override TextScript #'font-size = #2
361       \override TextScript #'font-shape = #'italic
362
363       \consists "Skip_event_swallow_translator"
364
365       \consists "Axis_group_engraver"
366     }
367     \context {
368       \PianoStaff
369       \accepts Dynamics
370     }
371   }
372 }
373 \score {
374   \new PianoStaff <<
375     \new Staff = "upper" << \upper \dynamics >>
376     \new Staff = "lower" << \lower \dynamics >>
377     \new Dynamics = "pedal" \pedal
378   >>
379   \midi {
380     \context {
381       \type "Performer_group"
382       \name Dynamics
383       \consists "Piano_pedal_performer"
384     }
385     \context {
386       \PianoStaff
387       \accepts Dynamics
388     }
389   }
390 }
391 @end lilypond
392
393
394 @node String quartet
395 @appendixsec String quartet
396 @appendixsubsec String quartet
397
398 Esta plantilla es una demostración de un cuarteto de cuerda.  También usa una sección @code{\global}
399 para las indicaciones del compás y de la armadura de la tonalidad.
400
401 @lilypond[quote,verbatim,ragged-right]
402 \version "2.11.51"
403
404 global= {
405   \time 4/4
406   \key c \major
407 }
408
409 violinOne = \new Voice { \relative c''{
410   \set Staff.instrumentName = "Violin 1 "
411
412   c2 d e1
413
414 \bar "|." }}
415 violinTwo = \new Voice { \relative c''{
416   \set Staff.instrumentName = "Violin 2 "
417
418   g2 f e1
419
420 \bar "|." }}
421 viola = \new Voice { \relative c' {
422   \set Staff.instrumentName = "Viola "
423   \clef alto
424
425   e2 d c1
426
427 \bar "|." }}
428 cello = \new Voice { \relative c' {
429   \set Staff.instrumentName = "Cello     "
430   \clef bass
431
432   c2 b a1
433
434 \bar "|."}}
435
436 \score {
437    \new StaffGroup <<
438       \new Staff << \global \violinOne >>
439       \new Staff << \global \violinTwo >>
440       \new Staff << \global \viola >>
441       \new Staff << \global \cello >>
442    >>
443    \layout { }
444    \midi { }
445 }
446 @end lilypond
447
448 @appendixsubsec String quartet parts
449
450 El ejemplo anterior produce un bonito cuarteto de cuerda, pero ¿y si necesitamos
451 imprimir las particellas?  Esta plantilla es una demostración de cómo aprovechar la posibilidad
452 de la instrucción @code{\tag} para dividir una pieza fácilmente en particellas individuales.
453
454 Tenemos que dividir esta plantilla en archivos independientes; los nombres de archivo
455 están incluidos en forma de comentarios al comienzo de cada archivo.  @code{piece.ly}
456 contiene todas las definiciones musicales.  Los otros archivos (@code{score.ly},
457 @code{vn1.ly}, @code{vn2.ly}, @code{vla.ly} y
458 @code{vlc.ly}) producen la particella correspondiente.
459
460 @verbatim
461 %%%%% piece.ly
462 \version "2.11.51"
463
464 global= {
465   \time 4/4
466   \key c \major
467 }
468
469 Violinone = \new Voice { \relative c''{
470   \set Staff.instrumentName = "Violin 1 "
471
472   c2 d e1
473
474 \bar "|." }}   %*********************************
475 Violintwo = \new Voice { \relative c''{
476   \set Staff.instrumentName = "Violin 2 "
477
478   g2 f e1
479
480 \bar "|." }}   %*********************************
481 Viola = \new Voice { \relative c' {
482   \set Staff.instrumentName = "Viola "
483   \clef alto
484
485   e2 d c1
486
487 \bar "|." }}   %*********************************
488 Cello = \new Voice { \relative c' {
489   \set Staff.instrumentName = "Cello     "
490   \clef bass
491
492   c2 b a1
493
494 \bar "|."}}   %**********************************
495
496 music = {
497   <<
498     \tag #'score \tag #'vn1 \new Staff { << \global \Violinone >> }
499     \tag #'score \tag #'vn2 \new Staff { << \global \Violintwo>> }
500     \tag #'score \tag #'vla \new Staff { << \global \Viola>> }
501     \tag #'score \tag #'vlc \new Staff { << \global \Cello>> }
502   >>
503 }
504
505
506
507 %%%%% score.ly
508 \version "2.11.51"
509 \include "piece.ly"
510 #(set-global-staff-size 14)
511 \score {
512   \new StaffGroup \keepWithTag #'score \music
513   \layout { }
514   \midi { }
515 }
516
517
518 %%%%% vn1.ly
519 \version "2.11.51"
520 \include "piece.ly"
521 \score {
522   \keepWithTag #'vn1 \music
523   \layout { }
524 }
525
526
527 %%%%% vn2.ly
528 \version "2.11.51"
529 \include "piece.ly"
530 \score {
531   \keepWithTag #'vn2 \music
532   \layout { }
533 }
534
535
536 %%%%% vla.ly
537 \version "2.11.51"
538 \include "piece.ly"
539 \score {
540   \keepWithTag #'vla \music
541   \layout { }
542 }
543
544
545 %%%%% vlc.ly
546 \version "2.11.51"
547 \include "piece.ly"
548 \score {
549   \keepWithTag #'vlc \music
550   \layout { }
551 }
552 @end verbatim
553
554
555 @node Vocal ensembles
556 @appendixsec Vocal ensembles
557
558 @appendixsubsec SATB vocal score
559
560 Aquí tenemos una partitura vocal estándar para coro SATB a cuatro voces.  Con conjuntos más grandes,
561 suele ser útil escribir una sección que luego será incluida en todas las partes.
562 Por ejemplo, la indicación de compás y la armadura de la tonalidad son casi siempre las mismas
563 para todas las partes.
564
565 @lilypond[quote,verbatim,ragged-right]
566 \version "2.11.51"
567 global = {
568    \key c \major
569    \time 4/4
570 }
571
572 sopMusic = \relative c'' {
573    c4 c c8[( b)] c4
574 }
575 sopWords = \lyricmode {
576    hi hi hi hi
577 }
578
579 altoMusic = \relative c' {
580    e4 f d e
581 }
582 altoWords =\lyricmode {
583    ha ha ha ha
584 }
585
586 tenorMusic = \relative c' {
587    g4 a f g
588 }
589 tenorWords = \lyricmode {
590    hu hu hu hu
591 }
592
593 bassMusic = \relative c {
594    c4 c g c
595 }
596 bassWords = \lyricmode {
597    ho ho ho ho
598 }
599
600 \score {
601    \new ChoirStaff <<
602       \new Lyrics = sopranos { s1 }
603       \new Staff = women <<
604          \new Voice =
605            "sopranos" { \voiceOne << \global \sopMusic >> }
606          \new Voice =
607            "altos" { \voiceTwo << \global \altoMusic >> }
608       >>
609       \new Lyrics = "altos" { s1 }
610       \new Lyrics = "tenors" { s1 }
611       \new Staff = men <<
612          \clef bass
613          \new Voice =
614            "tenors" { \voiceOne <<\global \tenorMusic >> }
615          \new Voice =
616            "basses" { \voiceTwo <<\global \bassMusic >> }
617       >>
618       \new Lyrics = basses { s1 }
619
620       \context Lyrics = sopranos \lyricsto sopranos \sopWords
621       \context Lyrics = altos \lyricsto altos \altoWords
622       \context Lyrics = tenors \lyricsto tenors \tenorWords
623       \context Lyrics = basses \lyricsto basses \bassWords
624    >>
625
626    \layout {
627       \context {
628          % a little smaller so lyrics
629          % can be closer to the staff
630          \Staff
631          \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
632       }
633    }
634 }
635 @end lilypond
636
637
638 @appendixsubsec SATB vocal score and automatic piano reduction
639
640 Esta plantilla añade una reducción automática para piano a la partitura vocal para coro SATB.
641 Es una demostración de uno de los puntos fuertes de LilyPond: podemos
642 usar una definición musical más de una vez.  Si hace algún cambio en las notas de la parte vocal
643 (como p.ej. tenorMusic), los cambios se aplicarán también a la
644 reducción de piano.
645
646 @lilypond[quote,verbatim,ragged-right]
647 \version "2.11.51"
648 global = {
649    \key c \major
650    \time 4/4
651 }
652
653 sopMusic = \relative c'' {
654    c4 c c8[( b)] c4
655 }
656 sopWords = \lyricmode {
657    hi hi hi hi
658 }
659
660 altoMusic = \relative c' {
661    e4 f d e
662 }
663 altoWords =\lyricmode {
664    ha ha ha ha
665 }
666
667 tenorMusic = \relative c' {
668    g4 a f g
669 }
670 tenorWords = \lyricmode {
671    hu hu hu hu
672 }
673
674 bassMusic = \relative c {
675    c4 c g c
676 }
677 bassWords = \lyricmode {
678    ho ho ho ho
679 }
680
681 \score {
682   <<
683     \new ChoirStaff <<
684       \new Lyrics = sopranos { s1 }
685       \new Staff = women <<
686         \new Voice =
687           "sopranos" { \voiceOne << \global \sopMusic >> }
688         \new Voice =
689           "altos" { \voiceTwo << \global \altoMusic >> }
690       >>
691       \new Lyrics = "altos" { s1 }
692       \new Lyrics = "tenors" { s1 }
693       \new Staff = men <<
694         \clef bass
695         \new Voice =
696           "tenors" { \voiceOne <<\global \tenorMusic >> }
697         \new Voice =
698           "basses" { \voiceTwo <<\global \bassMusic >> }
699       >>
700       \new Lyrics = basses { s1 }
701
702       \context Lyrics = sopranos \lyricsto sopranos \sopWords
703       \context Lyrics = altos \lyricsto altos \altoWords
704       \context Lyrics = tenors \lyricsto tenors \tenorWords
705       \context Lyrics = basses \lyricsto basses \bassWords
706     >>
707   \new PianoStaff <<
708     \new Staff <<
709       \set Staff.printPartCombineTexts = ##f
710       \partcombine
711       << \global \sopMusic >>
712       << \global \altoMusic >>
713     >>
714     \new Staff <<
715       \clef bass
716       \set Staff.printPartCombineTexts = ##f
717       \partcombine
718       << \global \tenorMusic >>
719       << \global \bassMusic >>
720     >>
721    >>
722   >>
723   \layout {
724     \context {
725       % a little smaller so lyrics
726       % can be closer to the staff
727       \Staff
728         \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
729     }
730   }
731 }
732 @end lilypond
733
734 @appendixsubsec SATB with aligned contexts
735
736 Aquí todas las líneas de texto se colocan usando @code{alignAboveContext}
737 y @code{alignBelowContext}.
738
739 @lilypond[quote,verbatim,ragged-right]
740 \version "2.11.51"
741 global = {
742   \key c \major
743   \time 4/4
744 }
745
746 sopMusic = \relative c'' {
747   c4 c c8[( b)] c4
748 }
749 sopWords = \lyricmode {
750   hi hi hi hi
751 }
752
753 altoMusic = \relative c' {
754   e4 f d e
755 }
756 altoWords =\lyricmode {
757   ha ha ha ha
758 }
759
760 tenorMusic = \relative c' {
761   g4 a f g
762 }
763 tenorWords = \lyricmode {
764   hu hu hu hu
765 }
766
767 bassMusic = \relative c {
768   c4 c g c
769 }
770 bassWords = \lyricmode {
771   ho ho ho ho
772 }
773
774 \score {
775   \new ChoirStaff <<
776      \new Staff = women <<
777         \new Voice =
778           "sopranos" { \voiceOne << \global \sopMusic >> }
779         \new Voice =
780           "altos" { \voiceTwo << \global \altoMusic >> }
781      >>
782      \new Lyrics \with {alignAboveContext=women} \lyricsto sopranos \sopWords
783      \new Lyrics \with {alignBelowContext=women} \lyricsto altos \altoWords
784 % we could remove the line about this with the line below, since we want
785 % the alto lyrics to be below the alto Voice anyway.
786 %    \new Lyrics \lyricsto altos \altoWords
787
788      \new Staff = men <<
789         \clef bass
790         \new Voice =
791           "tenors" { \voiceOne <<\global \tenorMusic >> }
792         \new Voice =
793           "basses" { \voiceTwo <<\global \bassMusic >> }
794      >>
795
796      \new Lyrics \with {alignAboveContext=men} \lyricsto tenors \tenorWords
797      \new Lyrics \with {alignBelowContext=men} \lyricsto basses \bassWords
798 % again, we could replace the line above this with the line below.
799 %    \new Lyrics \lyricsto basses \bassWords
800   >>
801
802   \layout {
803      \context {
804         % a little smaller so lyrics
805         % can be closer to the staff
806         \Staff
807         \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
808      }
809   }
810 }
811
812
813 \score {
814   \new ChoirStaff <<
815      \new Staff = women <<
816         \new Voice =
817           "sopranos" { \voiceOne << \global \sopMusic >> }
818         \new Voice =
819           "altos" { \voiceTwo << \global \altoMusic >> }
820      >>
821
822      \new Lyrics \with {alignAboveContext=women} \lyricsto sopranos \sopWords
823      \new Lyrics \lyricsto altos \altoWords
824
825      \new Staff = men <<
826         \clef bass
827         \new Voice =
828           "tenors" { \voiceOne <<\global \tenorMusic >> }
829         \new Voice =
830           "basses" { \voiceTwo <<\global \bassMusic >> }
831      >>
832
833      \new Lyrics \with {alignAboveContext=men} \lyricsto tenors \tenorWords
834      \new Lyrics \lyricsto basses \bassWords
835   >>
836
837   \layout {
838      \context {
839         % a little smaller so lyrics
840         % can be closer to the staff
841         \Staff
842         \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
843      }
844   }
845
846 @end lilypond
847
848
849 @c bad node name to avoid node name confict
850 @node Ancient notation templates
851 @appendixsec Ancient notation templates
852
853 @appendixsubsec Transcription of mensural music
854
855 Cuando se transcribe música mensural, es útil un «incipit» al principio de la pieza
856 para indicar la tonalidad y el compás originales.  Aunque hoy en día
857 los músicos están acostumbrados a las barras de compás para reconocer más rápidamente los patrones
858 rítmicos, las líneas divisorias no se habían inventado aún en el período de la música mensural;
859 de hecho, el compás solía cambiar cada pocas notas.
860 A modo de compromiso, las líneas de compás se suelen imprimir entre los pentagramas
861 en vez de hacerlo sobre ellos.
862
863 @lilypond[quote,verbatim,line-width=11.0\cm]
864 \version "2.11.51"
865
866 global = {
867   \set Score.skipBars = ##t
868
869   % incipit
870   \once \override Score.SystemStartBracket #'transparent = ##t
871   \override Score.SpacingSpanner #'spacing-increment = #1.0 % tight spacing
872   \key f \major
873   \time 2/2
874   \once \override Staff.TimeSignature #'style = #'neomensural
875   \override Voice.NoteHead #'style = #'neomensural
876   \override Voice.Rest #'style = #'neomensural
877   \set Staff.printKeyCancellation = ##f
878   \cadenzaOn % turn off bar lines
879   \skip 1*10
880   \once \override Staff.BarLine #'transparent = ##f
881   \bar "||"
882   \skip 1*1 % need this extra \skip such that clef change comes
883             % after bar line
884   \bar ""
885
886   % main
887   \revert Score.SpacingSpanner #'spacing-increment % CHECK: no effect?
888   \cadenzaOff % turn bar lines on again
889   \once \override Staff.Clef #'full-size-change = ##t
890   \set Staff.forceClef = ##t
891   \key g \major
892   \time 4/4
893   \override Voice.NoteHead #'style = #'default
894   \override Voice.Rest #'style = #'default
895
896   % FIXME: setting printKeyCancellation back to #t must not
897   % occur in the first bar after the incipit.  Dto. for forceClef.
898   % Therefore, we need an extra \skip.
899   \skip 1*1
900   \set Staff.printKeyCancellation = ##t
901   \set Staff.forceClef = ##f
902
903   \skip 1*7 % the actual music
904
905   % let finis bar go through all staves
906   \override Staff.BarLine #'transparent = ##f
907
908   % finis bar
909   \bar "|."
910 }
911
912 discantusNotes = {
913   \transpose c' c'' {
914     \set Staff.instrumentName = "Discantus  "
915
916     % incipit
917     \clef "neomensural-c1"
918     c'1. s2   % two bars
919     \skip 1*8 % eight bars
920     \skip 1*1 % one bar
921
922     % main
923     \clef "treble"
924     d'2. d'4 |
925     b e' d'2 |
926     c'4 e'4.( d'8 c' b |
927     a4) b a2 |
928     b4.( c'8 d'4) c'4 |
929     \once \override NoteHead #'transparent = ##t c'1 |
930     b\breve |
931   }
932 }
933
934 discantusLyrics = \lyricmode {
935   % incipit
936   IV-
937
938   % main
939   Ju -- bi -- |
940   la -- te De -- |
941   o, om --
942   nis ter -- |
943   ra, __ om- |
944   "..." |
945   -us. |
946 }
947
948 altusNotes = {
949   \transpose c' c'' {
950     \set Staff.instrumentName = "Altus  "
951
952     % incipit
953     \clef "neomensural-c3"
954     r1        % one bar
955     f1. s2    % two bars
956     \skip 1*7 % seven bars
957     \skip 1*1 % one bar
958
959     % main
960     \clef "treble"
961     r2 g2. e4 fis g | % two bars
962     a2 g4 e |
963     fis g4.( fis16 e fis4) |
964     g1 |
965     \once \override NoteHead #'transparent = ##t g1 |
966     g\breve |
967   }
968 }
969
970 altusLyrics = \lyricmode {
971   % incipit
972   IV-
973
974   % main
975   Ju -- bi -- la -- te | % two bars
976   De -- o, om -- |
977   nis ter -- ra, |
978   "..." |
979   -us. |
980 }
981
982 tenorNotes = {
983   \transpose c' c' {
984     \set Staff.instrumentName = "Tenor  "
985
986     % incipit
987     \clef "neomensural-c4"
988     r\longa   % four bars
989     r\breve   % two bars
990     r1        % one bar
991     c'1. s2   % two bars
992     \skip 1*1 % one bar
993     \skip 1*1 % one bar
994
995     % main
996     \clef "treble_8"
997     R1 |
998     R1 |
999     R1 |
1000     r2 d'2. d'4 b e' | % two bars
1001     \once \override NoteHead #'transparent = ##t e'1 |
1002     d'\breve |
1003   }
1004 }
1005
1006 tenorLyrics = \lyricmode {
1007   % incipit
1008   IV-
1009
1010   % main
1011   Ju -- bi -- la -- te | % two bars
1012   "..." |
1013   -us. |
1014 }
1015
1016 bassusNotes = {
1017   \transpose c' c' {
1018     \set Staff.instrumentName = "Bassus  "
1019
1020     % incipit
1021     \clef "bass"
1022     r\maxima  % eight bars
1023     f1. s2    % two bars
1024     \skip 1*1 % one bar
1025
1026     % main
1027     \clef "bass"
1028     R1 |
1029     R1 |
1030     R1 |
1031     R1 |
1032     g2. e4 |
1033     \once \override NoteHead #'transparent = ##t e1 |
1034     g\breve |
1035   }
1036 }
1037
1038 bassusLyrics = \lyricmode {
1039   % incipit
1040   IV-
1041
1042   % main
1043   Ju -- bi- |
1044   "..." |
1045   -us. |
1046 }
1047
1048 \score {
1049   \new StaffGroup = choirStaff <<
1050     \new Voice =
1051       "discantusNotes" << \global \discantusNotes >>
1052     \new Lyrics =
1053       "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics }
1054     \new Voice =
1055       "altusNotes" << \global \altusNotes >>
1056     \new Lyrics =
1057       "altusLyrics" \lyricsto altusNotes { \altusLyrics }
1058     \new Voice =
1059       "tenorNotes" << \global \tenorNotes >>
1060     \new Lyrics =
1061       "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics }
1062     \new Voice =
1063       "bassusNotes" << \global \bassusNotes >>
1064     \new Lyrics =
1065       "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics }
1066   >>
1067   \layout {
1068     \context {
1069       \Score
1070
1071       % no bars in staves
1072       \override BarLine #'transparent = ##t
1073
1074       % incipit should not start with a start delimiter
1075       \remove "System_start_delimiter_engraver"
1076     }
1077     \context {
1078       \Voice
1079
1080       % no slurs
1081       \override Slur #'transparent = ##t
1082
1083       % Comment in the below "\remove" command to allow line
1084       % breaking also at those barlines where a note overlaps
1085       % into the next bar.  The command is commented out in this
1086       % short example score, but especially for large scores, you
1087       % will typically yield better line breaking and thus improve
1088       % overall spacing if you comment in the following command.
1089       %\remove "Forbid_line_break_engraver"
1090     }
1091   }
1092 }
1093 @end lilypond
1094
1095
1096 @appendixsubsec Gregorian transcription template
1097
1098 Este ejemplo es una demostración de cómo hacer transcripción moderna de Canto
1099 Gregoriano.  La música gregoriana no tiene compás ni plicas; usa solamente cabezas de
1100 nota de blanca y negra, y marcas especiales que indican silencios de distinta longitud.
1101
1102 @lilypond[quote,verbatim,ragged-right]
1103 \include "gregorian-init.ly"
1104 \version "2.11.51"
1105
1106 chant = \relative c' {
1107   \set Score.timing = ##f
1108   f4 a2 \divisioMinima
1109   g4 b a2 f2 \divisioMaior
1110   g4( f) f( g) a2 \finalis
1111 }
1112
1113 verba = \lyricmode {
1114   Lo -- rem ip -- sum do -- lor sit a -- met
1115 }
1116
1117 \score {
1118   \new Staff <<
1119     \new Voice = "melody" {
1120       \chant
1121     }
1122     \new Lyrics = "one" \lyricsto melody \verba
1123   >>
1124
1125   \layout {
1126     \context {
1127       \Staff
1128       \remove "Time_signature_engraver"
1129       \remove "Bar_engraver"
1130       \override Stem #'transparent = ##t
1131     }
1132     \context {
1133       \Voice
1134       \override Stem #'length = #0
1135     }
1136     \context {
1137       \Score
1138       barAlways = ##t
1139     }
1140   }
1141 }
1142 @end lilypond
1143
1144
1145 @node Jazz combo
1146 @appendixsec Jazz combo
1147
1148 Éste es un ejemplo mucho más complicado, para un conjunto de jazz.  Fíjese en que todos los
1149 instrumentos están escritos en @code{\key c \major}.  Esto se refiere a la tonalidad en tono de concierto;
1150 LilyPond transporta automáticamente la tonalidad si la música está dentro de una
1151 sección @code{\transpose}.
1152
1153 @c TODO must clean up this jazz combo example
1154 @c   - transpositions stated in names (ie "trumpet in Bb" or whatever)
1155 @c   - one global section, instead of "global" (time) and "key"
1156 @c   - does it need those wierd macros?  sl, nsl, etc.
1157 @c   - maybe ask Amelie Zapf to clean it up, or whether I should just
1158 @c     make whatever changes I feel like.
1159
1160 @c FIXME: produces a warning ; key change merge.
1161 @c The `line-width' argument is for the \header.
1162
1163 @lilypond[quote,verbatim,ragged-right,line-width]
1164 \version "2.11.51"
1165 \header {
1166   title = "Song"
1167   subtitle = "(tune)"
1168   composer = "Me"
1169   meter = "moderato"
1170   piece = "Swing"
1171   tagline = \markup {
1172     \column {
1173       "LilyPond example file by Amelie Zapf,"
1174       "Berlin 07/07/2003"
1175     }
1176   }
1177   texidoc = "Jazz tune for combo
1178              (horns, guitar, piano, bass, drums)."
1179 }
1180
1181 #(set-global-staff-size 16)
1182 \include "english.ly"
1183
1184 %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
1185
1186 sl = {
1187   \override NoteHead #'style = #'slash
1188   \override Stem #'transparent = ##t
1189 }
1190 nsl = {
1191   \revert NoteHead #'style
1192   \revert Stem #'transparent
1193 }
1194 cr = \override NoteHead #'style = #'cross
1195 ncr = \revert NoteHead #'style
1196
1197 %% insert chord name style stuff here.
1198
1199 jzchords = { }
1200
1201
1202 %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
1203
1204 global = {
1205   \time 4/4
1206 }
1207
1208 Key = { \key c \major }
1209
1210 % ############ Horns ############
1211
1212 % ------ Trumpet ------
1213 trpt = \transpose c d \relative c'' {
1214   \Key
1215   c1 c c
1216 }
1217 trpharmony = \transpose c' d {
1218   \jzchords
1219 }
1220 trumpet = {
1221   \global
1222   \set Staff.instrumentName = #"Trumpet"
1223   \clef treble
1224   <<
1225     \trpt
1226   >>
1227 }
1228
1229 % ------ Alto Saxophone ------
1230 alto = \transpose c a \relative c' {
1231   \Key
1232   c1 c c
1233 }
1234 altoharmony = \transpose c' a {
1235   \jzchords
1236 }
1237 altosax = {
1238   \global
1239   \set Staff.instrumentName = #"Alto Sax"
1240   \clef treble
1241   <<
1242     \alto
1243   >>
1244 }
1245
1246 % ------ Baritone Saxophone ------
1247 bari = \transpose c a' \relative c {
1248   \Key
1249   c1 c \sl d4^"Solo" d d d \nsl
1250 }
1251 bariharmony = \transpose c' a \chordmode {
1252   \jzchords s1 s d2:maj e:m7
1253 }
1254 barisax = {
1255   \global
1256   \set Staff.instrumentName = #"Bari Sax"
1257   \clef treble
1258   <<
1259     \bari
1260   >>
1261 }
1262
1263 % ------ Trombone ------
1264 tbone = \relative c {
1265   \Key
1266   c1 c c
1267 }
1268 tboneharmony = \chordmode {
1269   \jzchords
1270 }
1271 trombone = {
1272   \global
1273   \set Staff.instrumentName = #"Trombone"
1274   \clef bass
1275   <<
1276     \tbone
1277   >>
1278 }
1279
1280 % ############ Rhythm Section #############
1281
1282 % ------ Guitar ------
1283 gtr = \relative c'' {
1284   \Key
1285   c1 \sl b4 b b b \nsl c1
1286 }
1287 gtrharmony = \chordmode {
1288   \jzchords
1289   s1 c2:min7+ d2:maj9
1290 }
1291 guitar = {
1292   \global
1293   \set Staff.instrumentName = #"Guitar"
1294   \clef treble
1295   <<
1296     \gtr
1297   >>
1298 }
1299
1300 %% ------ Piano ------
1301 rhUpper = \relative c'' {
1302   \voiceOne
1303   \Key
1304   c1 c c
1305 }
1306 rhLower = \relative c' {
1307   \voiceTwo
1308   \Key
1309   e1 e e
1310 }
1311
1312 lhUpper = \relative c' {
1313   \voiceOne
1314   \Key
1315   g1 g g
1316 }
1317 lhLower = \relative c {
1318   \voiceTwo
1319   \Key
1320   c1 c c
1321 }
1322
1323 PianoRH = {
1324   \clef treble
1325   \global
1326   \set Staff.midiInstrument = "acoustic grand"
1327   <<
1328     \new Voice = "one" \rhUpper
1329     \new Voice = "two" \rhLower
1330   >>
1331 }
1332 PianoLH = {
1333   \clef bass
1334   \global
1335   \set Staff.midiInstrument = "acoustic grand"
1336   <<
1337     \new Voice = "one" \lhUpper
1338     \new Voice = "two" \lhLower
1339   >>
1340 }
1341
1342 piano = {
1343   <<
1344     \set PianoStaff.instrumentName = #"Piano"
1345     \new Staff = "upper" \PianoRH
1346     \new Staff = "lower" \PianoLH
1347   >>
1348 }
1349
1350 % ------ Bass Guitar ------
1351 Bass = \relative c {
1352   \Key
1353   c1 c c
1354 }
1355 bass = {
1356   \global
1357   \set Staff.instrumentName = #"Bass"
1358   \clef bass
1359   <<
1360     \Bass
1361   >>
1362 }
1363
1364 % ------ Drums ------
1365 up = \drummode {
1366   hh4 <hh sn>4 hh <hh sn> hh <hh sn>4
1367   hh4 <hh sn>4
1368   hh4 <hh sn>4
1369   hh4 <hh sn>4
1370 }
1371
1372 down = \drummode {
1373   bd4 s bd s bd s bd s bd s bd s
1374 }
1375
1376 drumContents = {
1377   \global
1378   <<
1379     \set DrumStaff.instrumentName = #"Drums"
1380     \new DrumVoice { \voiceOne \up }
1381     \new DrumVoice { \voiceTwo \down }
1382   >>
1383 }
1384
1385 %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
1386
1387 \score {
1388   <<
1389     \new StaffGroup = "horns" <<
1390       \new Staff = "trumpet" \trumpet
1391       \new Staff = "altosax" \altosax
1392       \new ChordNames = "barichords" \bariharmony
1393       \new Staff = "barisax" \barisax
1394       \new Staff = "trombone" \trombone
1395     >>
1396
1397     \new StaffGroup = "rhythm" <<
1398       \new ChordNames = "chords" \gtrharmony
1399       \new Staff = "guitar" \guitar
1400       \new PianoStaff = "piano" \piano
1401       \new Staff = "bass" \bass
1402       \new DrumStaff { \drumContents }
1403     >>
1404   >>
1405
1406   \layout {
1407     \context { \RemoveEmptyStaffContext }
1408     \context {
1409       \Score
1410       \override BarNumber #'padding = #3
1411       \override RehearsalMark #'padding = #2
1412       skipBars = ##t
1413     }
1414   }
1415
1416   \midi { }
1417 }
1418 @end lilypond
1419
1420 @ignore
1421
1422 This isn't very useful, and only duplicates material in
1423 "global issues".  And if this info changes, this section often
1424 gets forgotten.
1425
1426 @no de Other templates
1427 @se ction Other templates
1428 @su bsection All headers
1429
1430 This template displays all available headers.  Some of them are only
1431 used in the Mutopia project; they don't affect the printed output at
1432 all.  They are used if you want the piece to be listed with different
1433 information in the Mutopia database than you wish to have printed on the
1434 music.  For example, Mutopia lists the composer of the famous D major
1435 violin concerto as TchaikovskyPI, whereas perhaps you wish to print
1436 "Petr Tchaikowski" on your music.
1437
1438 @ The `line-width' is for \header.
1439 @li lypond[quote,verbatim,ragged-right,line-width]
1440 \version "2.11.51"
1441 \header {
1442   dedication = "dedication"
1443   title = "Title"
1444   subtitle = "Subtitle"
1445   subsubtitle = "Subsubtitle"
1446   composer = "Composer (xxxx-yyyy)"
1447   opus = "Opus 0"
1448   piece = "Piece I"
1449   meter = "meter"
1450   instrument = "Instrument"
1451   arranger = "Arranger"
1452   poet = "Poet"
1453   texttranslator = "Translator"
1454   copyright = "public domain"
1455
1456   % These are headers used by the Mutopia Project
1457   % http://www.mutopiaproject.org/
1458   mutopiatitle = ""
1459   mutopiacomposer = ""
1460   mutopiapoet = ""
1461   mutopiainstrument = ""
1462   date = "composer's dates"
1463   source = "urtext "
1464   maintainer = "your name here"
1465   maintainerEmail = "your email here"
1466   maintainerWeb = "your home page"
1467   lastupdated = "2004/Aug/26"
1468 }
1469
1470 \score {
1471   { c'4 }
1472   \header {
1473     piece = "piece1"
1474     opus = "opus1"
1475   }
1476 }
1477
1478 \score {
1479   { c'4 }
1480   \header {
1481     piece = "piece2"
1482     opus = "opus2"
1483   }
1484 }
1485 @end lilypond
1486 @end ignore
1487
1488
1489 @node lilypond-book templates
1490 @appendixsec lilypond-book templates
1491
1492 Estas plantillas se usan para @code{lilypond-book}.  Si no está familiarizado con este
1493 programa, consulte @rprogram{LilyPond-book}.
1494
1495 @appendixsubsec LaTeX
1496
1497 Podemos insertar fragmentos de LilyPond dentro de un documento de LaTeX.
1498
1499 @example
1500 \documentclass[]@{article@}
1501
1502 \begin@{document@}
1503
1504 Texto normal en LaTeX.
1505
1506 \begin@{lilypond@}
1507 \relative c'' @{
1508 a4 b c d
1509 @}
1510 \end@{lilypond@}
1511
1512 Más texto en LaTeX.
1513
1514 \begin@{lilypond@}
1515 \relative c'' @{
1516 d4 c b a
1517 @}
1518 \end@{lilypond@}
1519 \end@{document@}
1520 @end example
1521
1522 @appendixsubsec Texinfo
1523
1524 Podemos insertar fragmentos de LilyPond dentro de Texinfo; de hecho, todo el presente manual
1525 está escrito en Texinfo.
1526
1527 @example
1528 \input texinfo
1529 @@node Top
1530
1531 Texto en Texinfo
1532
1533 @@lilypond[verbatim,fragment,ragged-right]
1534 a4 b c d
1535 @@end lilypond
1536
1537 Más texto en Texinfo
1538
1539 @@lilypond[verbatim,fragment,ragged-right]
1540 d4 c b a
1541 @@end lilypond
1542
1543 @@bye
1544 @end example
1545
1546
1547 @appendixsubsec xelatex
1548
1549 @verbatim
1550 \documentclass{article}
1551 \usepackage{ifxetex}
1552 \ifxetex
1553 %xetex specific stuff
1554 \usepackage{xunicode,fontspec,xltxtra}
1555 \setmainfont[Numbers=OldStyle]{Times New Roman}
1556 \setsansfont{Arial}
1557 \else
1558 %Esto puede estar en blanco si no vamos a usar  pdftex
1559 \usepackage[T1]{fontenc}
1560 \usepackage[utf8]{inputenc}
1561 \usepackage{mathptmx}%Times
1562 \usepackage{helvet}%Helvetica
1563 \fi
1564 %Aquí podemos insertar todos los paquetes que pdftex también entiende
1565 \usepackage[spanish,ngerman,finnish,english]{babel}
1566 \usepackage{graphicx}
1567
1568 \begin{document}
1569 \title{Un breve documento con LilyPond y xelatex}
1570 \maketitle
1571
1572 Las instrucciones \textbf{font} normales dentro del \emph{text}
1573 funcionan, porque \textsf{están contempladas por \LaTeX{} y XeteX.}
1574 Si quiere usar instrucciones específicas como \verb+\XeTeX+, debe
1575 incluirlas también dentro de un entorno \verb+\ifxetex+. Puede usar
1576 esto para imprimir la instrucción \ifxetex \XeTeX{} \else XeTeX \fi
1577 que no es conocida para el \LaTeX normal.
1578
1579 Dentro del texto normal puede usar fácilmente instrucciones de
1580 LilyPond, como ésta:
1581
1582 \begin{lilypond}
1583 {a2 b c'8 c' c' c'}
1584 \end{lilypond}
1585
1586 \noindent
1587 etcétera.
1588
1589 Las tipografías de los fragmentos establecidas con LilyPond se tendrán
1590 que ajustar desde dentro del fragmento. Para esto debe leer el manual
1591 UA en cuanto a cómo usar lilypond-book.
1592
1593 \selectlanguage{ngerman}
1594 Auch Umlaute funktionieren ohne die \LaTeX -Befehle, wie auch alle
1595 anderen
1596 seltsamen Zeichen: __ ______, wenn sie von der Schriftart
1597 unterst__tzt werden.
1598 \end{document}
1599 @end verbatim