]> git.donarmstrong.com Git - lilypond.git/blob - input/new/orchestra-choir-and-piano-template.ly
b718c5f40eebfcb51a9fe955aa60f49c484e8853
[lilypond.git] / input / new / orchestra-choir-and-piano-template.ly
1 \version "2.12.0"
2 \header {
3   lsrtags = "template"
4   texidoc = "
5 This template demonstrates the use of nested @code{StaffGroup}
6 and @code{GrandStaff} contexts to sub-group instruments of the same
7 type together, and the use of @code{\transpose} for transposing
8 instruments.  All music in variables is stored in C.  Music may be
9 entered in C or, alternatively, entered in the instrument key and
10 transposed to C (see trumpet) before being assigned to a variable.
11 "
12   doctitle = "Orchestra, choir and piano template"
13 }
14
15 fluteMusic    = \relative c' { \key c \major c1 d }
16 saxMusic      = \relative c' { \key c \major c1 d }
17 oboeMusic     = \relative c' { \key c \major c1 d }
18 clarinetMusic = \relative c' { \key c \major c1 d }
19 bassoonMusic  = \relative c  { \key c \major c1 d }
20 trumpetMusic  = \transpose c' bes {
21   \relative c' { \key d \major d1 e }
22 }
23 tromboneMusic = \relative c  { \key c \major c1 d }
24 hornOneMusic  = \relative c' { \key c \major c1 d }
25 hornTwoMusic  = \relative c  { \key c \major c1 d }
26 sopranoMusic  = \relative c'' {\key c \major c1 d }
27 sopranoLyrics = \lyricmode { Sop -- ra }
28 altoOneMusic  = \relative c' { \key c \major c1 d }
29 altoOneLyrics = \lyricmode { A -- one }
30 altoTwoMusic  = \relative c' { \key c \major c1 d }
31 altoTwoLyrics = \lyricmode { A -- two }
32 tenorMusic    = \relative c' { \key c \major c1 d }
33 tenorLyrics   = \lyricmode { Ten -- or }
34 pianoRHMusic  = \relative c' { \key c \major c1 d }
35 pianoLHMusic  = \relative c  { \key c \major c1 d }
36
37 \score {
38   <<  % Start full staff group
39     \new StaffGroup <<  % Woodwinds
40       \new Staff {  % Flute
41         \set Staff.instrumentName = "Flute"
42         \fluteMusic
43       }
44       \new StaffGroup <<
45         \new Staff {  % Bb Sax
46           \set Staff.instrumentName = \markup { \concat {"B" \flat} "Sax" }
47           \transposition bes
48           \transpose bes c' \saxMusic
49         }
50         \new Staff {  % Oboe
51           \set Staff.instrumentName = "Oboe"
52           \oboeMusic
53          }
54         \new Staff {  % Clarinet in A
55           \set Staff.instrumentName = "Clarinet"
56           \transposition a
57           \transpose a c' \clarinetMusic
58         }
59       >>
60       \new Staff {  % Bassoon
61         \set Staff.instrumentName = "Bassoon"
62         \clef bass
63         \transposition a,
64         \transpose a c' \bassoonMusic
65       }
66     >>
67     \new StaffGroup <<  % Start Brass group
68       \new Staff {  % Trumpet
69         \set Staff.instrumentName = "Trumpet"
70         \transposition bes
71         \transpose bes c' \trumpetMusic
72       }
73       \new Staff {  % Trombone
74         \set Staff.instrumentName = "Trombone"
75         \clef bass
76         \tromboneMusic
77       }
78       \new GrandStaff << % Horns need a GrandStaff (same instrument)
79         \new Staff {  % Horn 1
80           \set Staff.instrumentName = "Horn 1"
81           \transposition f
82           \transpose f c' \hornOneMusic
83         }
84         \new Staff {  % Horn 2
85           \set Staff.instrumentName = "Horn 2"
86           \clef bass
87           \transposition f
88           \transpose f c' \hornTwoMusic
89         }
90       >>
91     >>  % End Brass group
92     \new ChoirStaff <<
93       \new Staff {
94         \set Staff.instrumentName = "S"
95         \new Voice = "soprano"
96         \sopranoMusic
97       }
98       \new Lyrics \lyricsto "soprano" { \sopranoLyrics }
99       \new GrandStaff \with { \accepts Lyrics } <<
100         \new Staff  {
101           \set Staff.instrumentName = "A1"
102           \new Voice = "altoOne"
103           \altoOneMusic
104         }
105         \new Lyrics \lyricsto "altoOne" { \altoOneLyrics }
106         \new Staff {
107           \set Staff.instrumentName = "A2"
108           \new Voice = "altoTwo"
109           \altoTwoMusic
110         }
111         \new Lyrics \lyricsto "altoTwo" { \altoTwoLyrics }
112       >>
113       \new Staff {
114         \set Staff.instrumentName = "T"
115         \clef "treble_8"
116         \new Voice = "tenor"
117         \tenorMusic
118       }
119       \new Lyrics \lyricsto "tenor" { \tenorLyrics }
120     >>  % End ChoirStaff
121     \new PianoStaff \with { \consists Instrument_name_engraver } <<
122       \set PianoStaff.instrumentName = "Piano"
123       \new Staff { \pianoRHMusic }
124       \new Staff {
125         \clef bass
126         \pianoLHMusic
127       }
128     >>  % End PianoStaff
129   >>  % End full staff group
130 }
131