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