]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/orchestra,-choir-and-piano-template.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / orchestra,-choir-and-piano-template.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.19.56
8 \version "2.19.56"
9
10 \header {
11   lsrtags = "pitches, staff-notation, template, vocal-music"
12
13   texidoc = "
14 This template demonstrates the use of nested @code{StaffGroup} and
15 @code{GrandStaff} contexts to sub-group instruments of the same type
16 together, and a way to use @code{\\transpose} so that variables hold
17 music for transposing instruments at concert pitch.
18
19 "
20   doctitle = "Orchestra choir and piano template"
21 } % begin verbatim
22
23 #(set-global-staff-size 17)
24 \paper {
25   indent = 3.0\cm  % add space for instrumentName
26   short-indent = 1.5\cm  % add less space for shortInstrumentName
27 } % begin verbatim
28
29
30 fluteMusic = \relative c' { \key g \major g'1 b }
31
32 % Pitches as written on a manuscript for Clarinet in A
33 % are transposed to concert pitch.
34
35 clarinetMusic = \transpose c' a
36   \relative c'' { \key bes \major bes1 d }
37
38 trumpetMusic = \relative c { \key g \major g''1 b }
39
40 % Key signature is often omitted for horns
41
42 hornMusic = \transpose c' f
43   \relative c { d'1 fis }
44
45 percussionMusic = \relative c { \key g \major g1 b }
46
47 sopranoMusic = \relative c'' { \key g \major g'1 b }
48
49 sopranoLyrics = \lyricmode { Lyr -- ics }
50
51 altoIMusic = \relative c' { \key g \major g'1 b }
52
53 altoIIMusic = \relative c' { \key g \major g'1 b }
54
55 altoILyrics =  \sopranoLyrics
56
57 altoIILyrics = \lyricmode { Ah -- ah }
58
59 tenorMusic = \relative c' { \clef "treble_8" \key g \major g1 b }
60
61 tenorLyrics = \sopranoLyrics
62
63 pianoRHMusic = \relative c { \key g \major g''1 b }
64
65 pianoLHMusic = \relative c { \clef bass \key g \major g1 b }
66
67 violinIMusic = \relative c' { \key g \major g'1 b }
68
69 violinIIMusic = \relative c' { \key g \major g'1 b }
70
71 violaMusic = \relative c { \clef alto \key g \major g'1 b }
72
73 celloMusic = \relative c { \clef bass \key g \major g1 b }
74
75 bassMusic = \relative c { \clef "bass_8" \key g \major g,1 b }
76
77 \score {
78   <<
79     \new StaffGroup = "StaffGroup_woodwinds" <<
80       \new Staff = "Staff_flute" \with { instrumentName = #"Flute" }
81       \fluteMusic
82
83       \new Staff = "Staff_clarinet" \with {
84         instrumentName = \markup { \concat { "Clarinet in B" \flat } }
85       }
86
87       % Declare that written Middle C in the music
88       % to follow sounds a concert B flat, for
89       % output using sounded pitches such as MIDI.
90       %\transposition bes
91
92       % Print music for a B-flat clarinet
93       \transpose bes c' \clarinetMusic
94     >>
95
96     \new StaffGroup = "StaffGroup_brass" <<
97       \new Staff = "Staff_hornI" \with { instrumentName = #"Horn in F" }
98        % \transposition f
99         \transpose f c' \hornMusic
100
101       \new Staff = "Staff_trumpet" \with { instrumentName = #"Trumpet in  C" }
102       \trumpetMusic
103
104     >>
105     \new RhythmicStaff = "RhythmicStaff_percussion"
106     \with { instrumentName = #"Percussion" }
107     <<
108       \percussionMusic
109     >>
110     \new PianoStaff \with { instrumentName = #"Piano" }
111     <<
112       \new Staff { \pianoRHMusic }
113       \new Staff { \pianoLHMusic }
114     >>
115     \new ChoirStaff = "ChoirStaff_choir" <<
116       \new Staff = "Staff_soprano" \with { instrumentName = #"Soprano" }
117       \new Voice = "soprano"
118       \sopranoMusic
119
120       \new Lyrics \lyricsto "soprano" { \sopranoLyrics }
121       \new GrandStaff = "GrandStaff_altos"
122       \with { \accepts Lyrics } <<
123         \new Staff = "Staff_altoI"  \with { instrumentName = #"Alto I" }
124         \new Voice = "altoI"
125         \altoIMusic
126
127         \new Lyrics \lyricsto "altoI" { \altoILyrics }
128         \new Staff = "Staff_altoII" \with { instrumentName = #"Alto II" }
129         \new Voice = "altoII"
130         \altoIIMusic
131
132         \new Lyrics \lyricsto "altoII" { \altoIILyrics }
133       >>
134
135       \new Staff = "Staff_tenor" \with { instrumentName = #"Tenor" }
136         \new Voice = "tenor"
137         \tenorMusic
138
139       \new Lyrics \lyricsto "tenor" { \tenorLyrics }
140     >>
141     \new StaffGroup = "StaffGroup_strings" <<
142       \new GrandStaff = "GrandStaff_violins" <<
143         \new Staff = "Staff_violinI" \with { instrumentName = #"Violin I" }
144         \violinIMusic
145
146         \new Staff = "Staff_violinII" \with { instrumentName = #"Violin II" }
147         \violinIIMusic
148       >>
149
150       \new Staff = "Staff_viola" \with { instrumentName = #"Viola" }
151       \violaMusic
152
153       \new Staff = "Staff_cello" \with { instrumentName = #"Cello" }
154       \celloMusic
155
156       \new Staff = "Staff_bass" \with { instrumentName = #"Double Bass" }
157       \bassMusic
158     >>
159   >>
160   \layout { }
161 }