]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/jazz-combo-template.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / new / jazz-combo-template.ly
1 \version "2.19.56"
2
3 \header {
4   lsrtags = "fretted-strings, keyboards, percussion, real-music, template"
5
6   texidoc = "
7 This is quite an advanced template, for a jazz ensemble. Note that all
8 instruments are notated in @code{\\key c \\major}. This refers to the
9 key in concert pitch; the key will be automatically transposed if the
10 music is within a @code{\\transpose} section.
11
12 "
13   doctitle = "Jazz combo template"
14 } % begin verbatim
15
16 \header {
17   title = "Song"
18   subtitle = "(tune)"
19   composer = "Me"
20   meter = "moderato"
21   piece = "Swing"
22   tagline = \markup {
23     \column {
24       "LilyPond example file by Amelie Zapf,"
25       "Berlin 07/07/2003"
26     }
27   }
28 }
29 % To make the example display in the documentation
30 \paper {
31   paper-width = 130
32 }
33 %#(set-global-staff-size 16)
34 \include "english.ly"
35
36 %%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
37
38 sl = {
39   \override NoteHead.style = #'slash
40   \hide Stem
41 }
42 nsl = {
43   \revert NoteHead.style
44   \undo \hide Stem
45 }
46 crOn = \override NoteHead.style = #'cross
47 crOff = \revert NoteHead.style
48
49 %% insert chord name style stuff here.
50
51 jazzChords = { }
52
53 %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
54
55 global = { \time 4/4 }
56
57 Key = { \key c \major }
58
59 % ############ Horns ############
60
61 % ------ Trumpet ------
62 trpt = \transpose c d \relative c'' {
63   \Key
64   c1 | c | c |
65 }
66 trpHarmony = \transpose c' d {
67   \jazzChords
68 }
69 trumpet = {
70   \global
71   \clef treble
72   <<
73     \trpt
74   >>
75 }
76
77 % ------ Alto Saxophone ------
78 alto = \transpose c a \relative c' {
79   \Key
80   c1 | c | c |
81 }
82 altoHarmony = \transpose c' a {
83   \jazzChords
84 }
85 altoSax = {
86   \global
87   \clef treble
88   <<
89     \alto
90   >>
91 }
92
93 % ------ Baritone Saxophone ------
94 bari = \transpose c a' \relative c {
95   \Key
96   c1
97   c1
98   \sl
99   d4^"Solo" d d d
100   \nsl
101 }
102 bariHarmony = \transpose c' a \chordmode {
103   \jazzChords s1 s d2:maj e:m7
104 }
105 bariSax = {
106   \global
107   \clef treble
108   <<
109     \bari
110   >>
111 }
112
113 % ------ Trombone ------
114 tbone = \relative c {
115   \Key
116   c1 | c | c
117 }
118 tboneHarmony = \chordmode {
119   \jazzChords
120 }
121 trombone = {
122   \global
123   \clef bass
124   <<
125     \tbone
126   >>
127 }
128
129 % ############ Rhythm Section #############
130
131 % ------ Guitar ------
132 gtr = \relative c'' {
133   \Key
134   c1
135   \sl
136   b4 b b b
137   \nsl
138   c1
139 }
140 gtrHarmony = \chordmode {
141   \jazzChords
142   s1 c2:min7+ d2:maj9
143 }
144 guitar = {
145   \global
146   \clef treble
147   <<
148     \gtr
149   >>
150 }
151
152 %% ------ Piano ------
153 rhUpper = \relative c'' {
154   \voiceOne
155   \Key
156   c1 | c | c
157 }
158 rhLower = \relative c' {
159   \voiceTwo
160   \Key
161   e1 | e | e
162 }
163
164 lhUpper = \relative c' {
165   \voiceOne
166   \Key
167   g1 | g | g
168 }
169 lhLower = \relative c {
170   \voiceTwo
171   \Key
172   c1 | c | c
173 }
174
175 PianoRH = {
176   \clef treble
177   \global
178   <<
179     \new Voice = "one" \rhUpper
180     \new Voice = "two" \rhLower
181   >>
182 }
183 PianoLH = {
184   \clef bass
185   \global
186   <<
187     \new Voice = "one" \lhUpper
188     \new Voice = "two" \lhLower
189   >>
190 }
191
192 piano = {
193   <<
194     \new Staff = "upper" \PianoRH
195     \new Staff = "lower" \PianoLH
196   >>
197 }
198
199 % ------ Bass Guitar ------
200 Bass = \relative c {
201   \Key
202   c1 | c | c
203 }
204 bass = {
205   \global
206   \clef bass
207   <<
208     \Bass
209   >>
210 }
211
212 % ------ Drums ------
213 up = \drummode {
214   \voiceOne
215   hh4 <hh sn> hh <hh sn>
216   hh4 <hh sn> hh <hh sn>
217   hh4 <hh sn> hh <hh sn>
218 }
219 down = \drummode {
220   \voiceTwo
221   bd4 s bd s
222   bd4 s bd s
223   bd4 s bd s
224 }
225
226 drumContents = {
227   \global
228   <<
229     \new DrumVoice \up
230     \new DrumVoice \down
231   >>
232 }
233
234 %%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
235
236 \score {
237   <<
238     \new StaffGroup = "horns" <<
239       \new Staff = "trumpet" \with { instrumentName = #"Trumpet" }
240       \trumpet
241       \new Staff = "altosax" \with { instrumentName = #"Alto Sax" }
242       \altoSax
243       \new ChordNames = "barichords" \with { instrumentName = #"Trumpet" }
244       \bariHarmony
245       \new Staff = "barisax" \with { instrumentName = #"Bari Sax" }
246       \bariSax
247       \new Staff = "trombone" \with { instrumentName = #"Trombone" }
248       \trombone
249     >>
250
251     \new StaffGroup = "rhythm" <<
252       \new ChordNames = "chords" \gtrHarmony
253       \new Staff = "guitar" \with { instrumentName = #"Guitar" }
254       \guitar
255       \new PianoStaff = "piano" \with {
256         instrumentName = #"Piano"
257         midiInstrument = #"acoustic grand"
258       }
259       \piano
260       \new Staff = "bass" \with { instrumentName = #"Bass" }
261       \bass
262       \new DrumStaff \with { instrumentName = #"Drums" }
263       \drumContents
264     >>
265   >>
266   \layout {
267     \context { \Staff \RemoveEmptyStaves }
268     \context {
269       \Score
270       \override BarNumber.padding = #3
271       \override RehearsalMark.padding = #2
272       skipBars = ##t
273     }
274   }
275   \midi { }
276 }