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.
12 doctitle = "Orchestra, choir and piano template"
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 }
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 }
38 << % Start full staff group
39 \new StaffGroup << % Woodwinds
41 \set Staff.instrumentName = "Flute"
46 \set Staff.instrumentName = \markup { \concat {"B" \flat} "Sax" }
48 \transpose bes c' \saxMusic
51 \set Staff.instrumentName = "Oboe"
54 \new Staff { % Clarinet in A
55 \set Staff.instrumentName = "Clarinet"
57 \transpose a c' \clarinetMusic
60 \new Staff { % Bassoon
61 \set Staff.instrumentName = "Bassoon"
64 \transpose a c' \bassoonMusic
67 \new StaffGroup << % Start Brass group
68 \new Staff { % Trumpet
69 \set Staff.instrumentName = "Trumpet"
71 \transpose bes c' \trumpetMusic
73 \new Staff { % Trombone
74 \set Staff.instrumentName = "Trombone"
78 \new GrandStaff << % Horns need a GrandStaff (same instrument)
80 \set Staff.instrumentName = "Horn 1"
82 \transpose f c' \hornOneMusic
85 \set Staff.instrumentName = "Horn 2"
88 \transpose f c' \hornTwoMusic
94 \set Staff.instrumentName = "S"
95 \new Voice = "soprano"
98 \new Lyrics \lyricsto "soprano" { \sopranoLyrics }
99 \new GrandStaff \with { \accepts Lyrics } <<
101 \set Staff.instrumentName = "A1"
102 \new Voice = "altoOne"
105 \new Lyrics \lyricsto "altoOne" { \altoOneLyrics }
107 \set Staff.instrumentName = "A2"
108 \new Voice = "altoTwo"
111 \new Lyrics \lyricsto "altoTwo" { \altoTwoLyrics }
114 \set Staff.instrumentName = "T"
119 \new Lyrics \lyricsto "tenor" { \tenorLyrics }
121 \new PianoStaff \with { \consists Instrument_name_engraver } <<
122 \set PianoStaff.instrumentName = "Piano"
123 \new Staff { \pianoRHMusic }
129 >> % End full staff group