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