]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/vocal-ensemble-template-with-automatic-piano-reduction.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / new / vocal-ensemble-template-with-automatic-piano-reduction.ly
1 \version "2.14.0"
2
3 \header {
4   lsrtags = "vocal-music, keyboards, template"
5
6   texidoc = "
7 This template adds an automatic piano reduction to the standard SATB
8 vocal score demonstrated in @qq{Vocal ensemble template}. This
9 demonstrates one of the strengths of LilyPond – you can use a music
10 definition more than once. If any changes are made to the vocal notes
11 (say, @code{tenorMusic}), then the changes will also apply to the piano
12 reduction.
13 "
14   doctitle = "Vocal ensemble template with automatic piano reduction"
15 }
16
17 \paper {
18   top-system-spacing #'basic-distance = #10
19   score-system-spacing #'basic-distance = #20
20   system-system-spacing #'basic-distance = #20
21   last-bottom-spacing #'basic-distance = #10
22 }
23
24 global = {
25   \key c \major
26   \time 4/4
27 }
28
29 sopMusic = \relative c'' {
30   c4 c c8[( b)] c4
31 }
32 sopWords = \lyricmode {
33   hi hi hi hi
34 }
35
36 altoMusic = \relative c' {
37   e4 f d e
38 }
39 altoWords =\lyricmode {
40   ha ha ha ha
41 }
42
43 tenorMusic = \relative c' {
44   g4 a f g
45 }
46 tenorWords = \lyricmode {
47   hu hu hu hu
48 }
49
50 bassMusic = \relative c {
51   c4 c g c
52 }
53 bassWords = \lyricmode {
54   ho ho ho ho
55 }
56
57 \score {
58   <<
59     \new ChoirStaff <<
60       \new Lyrics = "sopranos" \with {
61         % This is needed for lyrics above a staff
62         \override VerticalAxisGroup #'staff-affinity = #DOWN
63       }
64       \new Staff = "women" <<
65         \new Voice = "sopranos" { \voiceOne << \global \sopMusic >> }
66         \new Voice = "altos" { \voiceTwo << \global \altoMusic >> }
67       >>
68       \new Lyrics = "altos"
69       \new Lyrics = "tenors" \with {
70         % This is needed for lyrics above a staff
71         \override VerticalAxisGroup #'staff-affinity = #DOWN
72       }
73
74       \new Staff = "men" <<
75         \clef bass
76         \new Voice = "tenors" { \voiceOne << \global \tenorMusic >> }
77         \new Voice = "basses" { \voiceTwo << \global \bassMusic >> }
78       >>
79       \new Lyrics = "basses"
80       \context Lyrics = "sopranos" \lyricsto "sopranos" \sopWords
81       \context Lyrics = "altos" \lyricsto "altos" \altoWords
82       \context Lyrics = "tenors" \lyricsto "tenors" \tenorWords
83       \context Lyrics = "basses" \lyricsto "basses" \bassWords
84     >>
85     \new PianoStaff <<
86       \new Staff <<
87         \set Staff.printPartCombineTexts = ##f
88         \partcombine
89         << \global \sopMusic >>
90         << \global \altoMusic >>
91       >>
92       \new Staff <<
93         \clef bass
94         \set Staff.printPartCombineTexts = ##f
95         \partcombine
96         << \global \tenorMusic >>
97         << \global \bassMusic >>
98       >>
99     >>
100   >>
101 }