]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/percussion.itely
Split WWW target in two stages WWW-1 and WWW-2
[lilypond.git] / Documentation / user / percussion.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.38"
10
11 @node Percussion
12 @section Percussion
13
14 @menu
15 * Common notation for percussion::
16 @end menu
17
18 @node Common notation for percussion
19 @subsection Common notation for percussion
20
21 Rhythmic music is primarily used for percussion and drum notation, but it can
22 also be used to show the rhythms of melodies.
23
24 @menu
25 * References for percussion::
26 * Basic percussion notation::
27 * Percussion staves::
28 * Ghost notes::
29 @end menu
30
31 @node References for percussion
32 @subsubsection References for percussion
33
34 @c TODO Add refs
35 TBC
36
37
38 @seealso
39
40 Internals Reference: @rinternals{RhythmicStaff}.
41
42
43 @node Basic percussion notation
44 @subsubsection Basic percussion notation
45
46 @cindex percussion
47 @cindex drums
48
49
50 Percussion notes may be entered in @code{\drummode} mode, which is
51 similar to the standard mode for entering notes.  Each piece of
52 percussion has a full name and an abbreviated name, and both can
53 be used in input files.  The simplest way to enter percussion notes
54 is to use the @code{\drums} command, which creates the correct
55 context and entry mode for percussion:
56
57 @lilypond[quote,ragged-right,verbatim]
58 \drums {
59   hihat hh bassdrum bd
60 }
61 @end lilypond
62
63 This is shorthand for
64
65 @lilypond[quote,ragged-right,verbatim]
66 \new DrumStaff
67 \drummode {
68   hihat hh bassdrum bd
69 }
70 @end lilypond
71
72
73 The complete list of drum names is in the init file
74 @file{ly/@/drumpitch@/-init@/.ly}.
75 @c TODO: properly document this.
76
77 Drum rolls are indicated with three slashes across the stem.
78 For quarter notes or longer the three slashes are shown explicitly,
79 eighth notes are shown with two slashes (the beam being the third),
80 and drum rolls shorter than eighths have one stem slash to
81 supplement the beams.  This is achieved with the tremolo notation,
82 @code{:32}, see @ref{Tremolo repeats}.  Here's an example of
83 some snare rolls:
84
85 @lilypond[quote,ragged-right,verbatim]
86 \new DrumStaff
87 \drummode {
88   \time 2/4
89   sn16 sn8 sn16 sn8 sn8:32~ |
90   sn8 sn8 sn4:32~ |
91   sn4 sn8 sn16 sn16 |
92   sn4 r4 |
93 }
94 @end lilypond
95
96 Sticking can be indicated by placing @code{^"R"} or @code{^"L"}
97 after the note.  The @code{staff-padding} property may be
98 overridden to achieve a pleasing baseline.
99
100 @c TODO Add example of sticking
101
102 @seealso
103
104 Internals Reference: @rinternals{note-event}.
105
106 @node Percussion staves
107 @subsubsection Percussion staves
108 @cindex percussion
109 @cindex drums
110
111 A percussion part for more than one instrument typically uses a
112 multiline staff where each position in the staff refers to one piece
113 of percussion.
114
115
116 To typeset the music, the notes must be interpreted in a
117 @rinternals{DrumStaff} and @rinternals{DrumVoice} contexts
118
119 @lilypond[quote,ragged-right,verbatim]
120 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
121 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
122   \new DrumStaff <<
123     \new DrumVoice { \voiceOne \up }
124     \new DrumVoice { \voiceTwo \down }
125   >>
126 @end lilypond
127
128 The above example shows verbose polyphonic notation.  The short
129 polyphonic notation, described in @rlearning{I'm hearing Voices},
130 can also be used if the @rinternals{DrumVoice}s are instantiated
131 by hand first.  For example,
132
133 @lilypond[quote,ragged-right,fragment,verbatim]
134 \new DrumStaff <<
135   \new DrumVoice = "1" { s1 *2 }
136   \new DrumVoice = "2" { s1 *2 }
137   \drummode {
138     bd4 sn4 bd4 sn4
139     <<
140       { \repeat unfold 16 hh16 }
141       \\
142       { bd4 sn4 bd4 sn4 }
143     >>
144   }
145 >>
146 @end lilypond
147
148
149 There are also other layout possibilities.  To use these, set the
150 property @code{drumStyleTable} in context @rinternals{DrumVoice}.
151 The following variables have been predefined
152
153 @table @code
154 @item drums-style
155 This is the default.  It typesets a typical drum kit on a five-line staff
156
157 @lilypond[quote,line-width=10.0\cm]
158 nam = \lyricmode {
159   cymc cyms cymr hh hhc hho hhho hhp
160   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
161 mus = \drummode {
162   cymc cyms cymr hh hhc hho hhho hhp \break
163   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
164 \score {
165   << \new DrumStaff \with {
166        \remove Bar_engraver
167        \remove Time_signature_engraver
168        \override Stem #'transparent = ##t
169        \override Stem #'Y-extent-callback = ##f
170        \override VerticalAxisGroup #'minimum-Y-extent = #'(-4.0 . 5.0)
171      } \mus
172      \new Lyrics \nam
173   >>
174   \layout {
175     \context {
176       \Score
177       \override LyricText #'font-family = #'typewriter
178       \override BarNumber #'transparent =##T
179     }
180   }
181 }
182 @end lilypond
183
184 The drum scheme supports six different toms.  When there are fewer toms,
185 simply select the toms that produce the desired result, i.e., to get toms
186 on the three middle lines you use @code{tommh}, @code{tomml}, and
187 @code{tomfh}.
188
189 @item timbales-style
190 This typesets timbales on a two line staff
191
192 @lilypond[quote,ragged-right]
193 nam = \lyricmode { timh ssh timl ssl cb }
194 mus = \drummode { timh ssh timl ssl cb s16 }
195
196 <<
197   \new DrumStaff \with {
198     \remove Bar_engraver
199     \remove Time_signature_engraver
200     \override Stem #'transparent = ##t
201     \override Stem #'Y-extent-callback = ##f
202     \override StaffSymbol #'line-count = #2
203     \override StaffSymbol #'staff-space = #2
204     \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.0 . 4.0)
205     drumStyleTable = #timbales-style
206   } \mus
207   \new Lyrics {
208     \override LyricText #'font-family = #'typewriter
209     \nam
210   }
211 >>
212 @end lilypond
213
214 @item congas-style
215 This typesets congas on a two line staff
216
217 @lilypond[quote,ragged-right]
218 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
219 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
220
221 <<
222   \new DrumStaff \with {
223     \remove Bar_engraver
224     \remove Time_signature_engraver
225     drumStyleTable = #congas-style
226     \override StaffSymbol #'line-count = #2
227
228     %% this sucks; it will lengthen stems.
229     \override StaffSymbol #'staff-space = #2
230     \override Stem #'transparent = ##t
231     \override Stem #'Y-extent-callback = ##f
232   } \mus
233   \new Lyrics {
234     \override LyricText #'font-family = #'typewriter
235     \nam
236   }
237 >>
238 @end lilypond
239
240 @item bongos-style
241 This typesets bongos on a two line staff
242
243 @lilypond[quote,ragged-right]
244 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
245 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
246
247 <<
248   \new DrumStaff \with {
249     \remove Bar_engraver
250     \remove Time_signature_engraver
251     \override StaffSymbol #'line-count = #2
252     drumStyleTable = #bongos-style
253
254     %% this sucks; it will lengthen stems.
255     \override StaffSymbol #'staff-space = #2
256     \override Stem #'transparent = ##t
257     \override Stem #'Y-extent-callback = ##f
258   } \mus
259   \new Lyrics {
260     \override LyricText #'font-family = #'typewriter
261     \nam
262   }
263 >>
264 @end lilypond
265
266 @item percussion-style
267 To typeset all kinds of simple percussion on one line staves.
268
269 @lilypond[quote,ragged-right]
270 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
271 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
272
273 <<
274   \new DrumStaff \with{
275     \remove Bar_engraver
276     drumStyleTable = #percussion-style
277     \override StaffSymbol #'line-count = #1
278     \remove Time_signature_engraver
279     \override Stem #'transparent = ##t
280     \override Stem #'Y-extent-callback = ##f
281   } \mus
282   \new Lyrics {
283     \override LyricText #'font-family = #'typewriter
284     \nam
285   }
286 >>
287 @end lilypond
288 @end table
289
290 If you do not like any of the predefined lists you can define your own
291 list at the top of your file
292
293 @lilypond[quote,ragged-right,verbatim]
294 #(define mydrums '(
295          (bassdrum     default   #f         -1)
296          (snare        default   #f         0)
297          (hihat        cross     #f         1)
298          (pedalhihat   xcircle   "stopped"  2)
299          (lowtom       diamond   #f         3)))
300 up = \drummode { hh8 hh hh hh hhp4 hhp }
301 down = \drummode { bd4 sn bd toml8 toml }
302
303 \new DrumStaff <<
304   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
305   \new DrumVoice { \voiceOne \up }
306   \new DrumVoice { \voiceTwo \down }
307 >>
308 @end lilypond
309
310
311 @seealso
312
313 Init files: @file{ly/@/drumpitch@/-init@/.ly}.
314
315 Internals Reference: @rinternals{DrumStaff}, @rinternals{DrumVoice}.
316
317 @knownissues
318
319 Because general MIDI does not contain rim shots, the sidestick is used
320 for this purpose instead.
321
322
323 @c TODO: check name -gp
324 @node Ghost notes
325 @subsubsection Ghost notes
326
327 Ghost notes for drums and percussion may be created using the
328 @code{\parenthesize} command detailed in @ref{Parentheses}.  However,
329 the default @code{\drummode} does
330 not include the @code{Parenthesis_engraver} plugin which allows
331 this.
332
333 @lilypond[quote,ragged-right,verbatim,fragment]
334 \new DrumStaff \with {
335   \consists "Parenthesis_engraver"
336 } <<
337   \context DrumVoice  = "1"  { s1 *2 }
338   \context DrumVoice  = "2" { s1 *2 }
339   \drummode {
340     <<
341       {
342         hh8[ hh] <hh sn> hh16
343         < \parenthesize sn > hh < \parenthesize
344         sn > hh8 <hh sn> hh
345       } \\ {
346         bd4 r4 bd8 bd r8 bd
347       }
348     >>
349   }
350 >>
351 @end lilypond
352
353 @noindent
354 Also note that you must add chords (@code{< >} brackets)
355 around each @code{\parenthesize} statement.
356
357
358