]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/percussion.itely
717e924df397bcccadb5861fa5d3038f5e321127
[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.51"
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 * Drum rolls::                  
28 * Pitched percussion::          
29 * Percussion staves::           
30 * Custom percussion staves::    
31 * Ghost notes::                 
32 @end menu
33
34 @node References for percussion
35 @subsubsection References for percussion
36
37 TODO add more.
38
39 @itemize
40
41 @item Some percussion may be notated on a rhythmic staff; this is
42 discussed in @ref{Showing melody rhythms}, and
43 @ref{Instantiating new staves}.
44
45 @item MIDI output is discussed in a separate section; please see
46 @ref{Percussion in MIDI}.
47
48 @end itemize
49
50 @seealso
51
52 Notation Reference:
53 @ref{Showing melody rhythms},
54 @ref{Instantiating new staves}.
55 @ref{Percussion in MIDI}.
56
57 Snippets: @rlsr{Percussion}.
58
59
60 @node Basic percussion notation
61 @subsubsection Basic percussion notation
62
63 @cindex percussion
64 @cindex drums
65
66 Percussion notes may be entered in @code{\drummode} mode, which is
67 similar to the standard mode for entering notes.  The simplest way
68 to enter percussion notes is to use the @code{\drums} command,
69 which creates the correct context and entry mode for percussion:
70
71 @lilypond[quote,verbatim]
72 \drums {
73   hihat4 hh bassdrum bd
74 }
75 @end lilypond
76
77 This is shorthand for:
78
79 @lilypond[quote,verbatim]
80 \new DrumStaff {
81   \drummode {
82     hihat4 hh bassdrum bd
83   }
84 }
85 @end lilypond
86
87 Each piece of percussion has a full name and an abbreviated name,
88 and both can be used in input files.  The full list of percussion
89 note names may be found in @ref{Percussion notes}.
90
91 Note that the normal notation of pitches (such as @code{cis4}) in
92 a @code{DrumStaff} context will cause an error message.
93 Percussion clefs are added automatically to a @code{DrumStaff}
94 contex, but other clefs may also be used.
95
96 There are a few issues concerning MIDI support for percussion
97 instruments; for details please see @ref{Percussion in MIDI}.
98
99 @seealso
100
101 Notation Reference: @ref{Percussion in MIDI}, @ref{Percussion notes}.
102
103 File: @file{ly/@/drumpitch@/-init@/.ly}
104
105 Snippets: @rlsr{Percussion}.
106
107
108 @node Drum rolls
109 @subsubsection Drum rolls
110
111 Drum rolls are indicated with three slashes across the stem.  For
112 quarter notes or longer the three slashes are shown explicitly,
113 eighth notes are shown with two slashes (the beam being the
114 third), and drum rolls shorter than eighths have one stem slash to
115 supplement the beams.  This is achieved with the tremolo notation,
116 @code{:32}, as described in @ref{Tremolo repeats}.  Here is an
117 example of some snare rolls:
118
119 @lilypond[quote,verbatim]
120 \drums {
121   \time 2/4
122   sn16 sn8 sn16 sn8 sn8:32 ~
123   sn8 sn8 sn4:32 ~
124   sn4 sn8 sn16 sn16
125   sn4 r4
126 }
127 @end lilypond
128
129 Sticking can be indicated by placing @code{^"R"} or @code{^"L"}
130 after the note.  The @code{staff-padding} property may be
131 overridden to achieve a pleasing baseline.
132
133 @lilypond[quote,verbatim]
134 \drums {
135   \repeat unfold 2 {
136     sn16 ^"L" sn^"R" sn^"L" sn^"L" sn^"R" sn^"L"  sn^"R" sn^"R"
137   }
138 }
139 @end lilypond
140
141 @seealso
142
143 Snippets: @rlsr{Percussion}.
144
145
146 @node Pitched percussion
147 @subsubsection Pitched percussion
148
149 Certain pitched percussion instruments (e.g. xylophone,
150 vibraphone, and timpani) are written using with normal staffs.
151 This is covered in other sections of the manual.
152
153 @seealso
154
155 @c TODO: possibly link to an alternate section of NR 3.5, if
156 @c "percussion in MIDI" gets a separate subsubsection for
157 @c pitched percussion sounds.  -gp
158 Notation Reference: @ref{Percussion in MIDI}.
159
160 Snippets: @rlsr{Percussion}.
161
162
163 @node Percussion staves
164 @subsubsection Percussion staves
165
166 @cindex percussion
167 @cindex drums
168
169 A percussion part for more than one instrument typically uses a
170 multiline staff where each position in the staff refers to one
171 piece of percussion.  To typeset the music, the notes must be
172 interpreted in @code{DrumStaff} and @code{DrumVoice} context.
173
174 @lilypond[quote,verbatim]
175 up = \drummode {
176   crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat
177 }
178 down = \drummode {
179   bassdrum4 snare8 bd r bd sn4
180 }
181 \new DrumStaff <<
182   \new DrumVoice { \voiceOne \up }
183   \new DrumVoice { \voiceTwo \down }
184 >>
185 @end lilypond
186
187 The above example shows verbose polyphonic notation.  The short
188 polyphonic notation, described in @rlearning{I'm hearing Voices},
189 can also be used if the voices are instantiated by hand first.
190 For example,
191
192 @lilypond[quote,verbatim]
193 \new DrumStaff <<
194   \new DrumVoice = "1" { s1*2 }
195   \new DrumVoice = "2" { s1*2 }
196   \drummode {
197     bd4 sn4 bd4 sn4
198     << {
199       \repeat unfold 16 hh16
200     } \\ {
201       bd4 sn4 bd4 sn4
202     } >>
203   }
204 >>
205 @end lilypond
206
207 There are also other layout possibilities.  To use these, set the
208 property @code{drumStyleTable} in context @code{DrumVoice}.  The
209 following variables have been predefined:
210
211 @c FIXME: decide what to do about this table.  (ie verbatim or not)
212 @table @code
213
214 @item drums-style
215 This is the default.  It typesets a typical drum kit on a
216 five-line staff:
217
218 @lilypond[quote,line-width=10.0\cm]
219 nam = \lyricmode {
220   cymc cyms cymr hh hhc hho hhho hhp
221   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
222 mus = \drummode {
223   cymc cyms cymr hh hhc hho hhho hhp \break
224   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
225 \score {
226   << \new DrumStaff \with {
227        \remove Bar_engraver
228        \remove Time_signature_engraver
229        \override Stem #'transparent = ##t
230        \override Stem #'Y-extent-callback = ##f
231        \override VerticalAxisGroup #'minimum-Y-extent = #'(-4.0 . 5.0)
232      } \mus
233      \new Lyrics \nam
234   >>
235   \layout {
236     \context {
237       \Score
238       \override LyricText #'font-family = #'typewriter
239       \override BarNumber #'transparent =##T
240     }
241   }
242 }
243 @end lilypond
244
245 The drum scheme supports six different toms.  When there are fewer
246 toms, simply select the toms that produce the desired result.  For
247 example, to get toms on the three middle lines you use
248 @code{tommh}, @code{tomml}, and @code{tomfh}.
249
250 @item timbales-style
251 This typesets timbales on a two line staff:
252
253 @lilypond[quote,ragged-right]
254 nam = \lyricmode { timh ssh timl ssl cb }
255 mus = \drummode { timh ssh timl ssl cb s16 }
256
257 <<
258   \new DrumStaff \with {
259     \remove Bar_engraver
260     \remove Time_signature_engraver
261     \override Stem #'transparent = ##t
262     \override Stem #'Y-extent-callback = ##f
263     \override StaffSymbol #'line-count = #2
264     \override StaffSymbol #'staff-space = #2
265     \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.0 . 4.0)
266     drumStyleTable = #timbales-style
267   } \mus
268   \new Lyrics {
269     \override LyricText #'font-family = #'typewriter
270     \nam
271   }
272 >>
273 @end lilypond
274
275 @item congas-style
276 This typesets congas on a two line staff:
277
278 @lilypond[quote,ragged-right]
279 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
280 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
281
282 <<
283   \new DrumStaff \with {
284     \remove Bar_engraver
285     \remove Time_signature_engraver
286     drumStyleTable = #congas-style
287     \override StaffSymbol #'line-count = #2
288
289     %% this sucks; it will lengthen stems.
290     \override StaffSymbol #'staff-space = #2
291     \override Stem #'transparent = ##t
292     \override Stem #'Y-extent-callback = ##f
293   } \mus
294   \new Lyrics {
295     \override LyricText #'font-family = #'typewriter
296     \nam
297   }
298 >>
299 @end lilypond
300
301 @item bongos-style
302 This typesets bongos on a two line staff:
303
304 @lilypond[quote,ragged-right]
305 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
306 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
307
308 <<
309   \new DrumStaff \with {
310     \remove Bar_engraver
311     \remove Time_signature_engraver
312     \override StaffSymbol #'line-count = #2
313     drumStyleTable = #bongos-style
314
315     %% this sucks; it will lengthen stems.
316     \override StaffSymbol #'staff-space = #2
317     \override Stem #'transparent = ##t
318     \override Stem #'Y-extent-callback = ##f
319   } \mus
320   \new Lyrics {
321     \override LyricText #'font-family = #'typewriter
322     \nam
323   }
324 >>
325 @end lilypond
326
327 @item percussion-style
328 To typeset all kinds of simple percussion on one line staves:
329
330 @lilypond[quote,ragged-right]
331 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
332 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
333
334 <<
335   \new DrumStaff \with{
336     \remove Bar_engraver
337     drumStyleTable = #percussion-style
338     \override StaffSymbol #'line-count = #1
339     \remove Time_signature_engraver
340     \override Stem #'transparent = ##t
341     \override Stem #'Y-extent-callback = ##f
342   } \mus
343   \new Lyrics {
344     \override LyricText #'font-family = #'typewriter
345     \nam
346   }
347 >>
348 @end lilypond
349 @end table
350
351
352 @node Custom percussion staves
353 @subsubsection Custom percussion staves
354
355 If you do not like any of the predefined lists you can define your
356 own list at the top of your file.
357
358 @lilypond[quote,verbatim]
359 #(define mydrums '(
360          (bassdrum     default   #f         -1)
361          (snare        default   #f         0)
362          (hihat        cross     #f         1)
363          (pedalhihat   xcircle   "stopped"  2)
364          (lowtom       diamond   #f         3)))
365 up = \drummode { hh8 hh hh hh hhp4 hhp }
366 down = \drummode { bd4 sn bd toml8 toml }
367
368 \new DrumStaff <<
369   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
370   \new DrumVoice { \voiceOne \up }
371   \new DrumVoice { \voiceTwo \down }
372 >>
373 @end lilypond
374
375
376 @snippets
377
378 FIXME: MOVE ALL THESE TO LSR!  -gp
379
380 Here are some examples:
381
382 Two Woodblocks, entered with wbh (high woodblock) and wbl (low woodblock)
383
384 @lilypond[quote,verbatim]
385 #(define mydrums '(
386          (hiwoodblock     default   #t        3)
387          (lowoodblock       default   #t        -2)))
388          %% These lines define the position of the woodblocks in the stave, if You like, You can change it 
389          % or You can use  special note heads for the woodblocks.
390          woodstaff = { \override Staff.StaffSymbol #'line-positions = #'(-2 3)  
391 % this defines a staff with only two lines. It also defines the positions of the two lines
392          \override Staff.BarLine #'bar-size  = #3 }
393          %% this is neccessary. If not entered, the barline wuld be too short!
394  
395  \new DrumStaff  {
396          \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) 
397          %% with this You load Your new drum style table
398          \woodstaff 
399          \drummode {
400         \time 2/4
401         wbl8 wbl16 wbl wbh 8 -> wbl |
402         wbl 8 wbl16  wbh ~ -> wbh wbl 16 r8 |
403          }
404 }
405 @end lilypond
406
407 @seealso
408
409 Note that in this special case the length of the barline must
410 altered with @code{\override Staff.BarLine #'bar-size #number}.
411 Otherwise it would be too short. And You have also to define the
412 positions of the to stafflines.  For more information about these
413 delicate things have a look at @ref{Staff symbol}.
414
415
416 A tambourine, entered with "tamb":
417
418 @lilypond[quote,verbatim]
419  % tambourine-music is entered with "tamb"
420         tambustaff = { \override Staff.StaffSymbol #'line-positions = #'( 0 )   
421                 \override Staff.BarLine #'bar-size  = #3 
422         \set DrumStaff.instrumentName="Tambourine"}
423  \new DrumStaff {
424          \tambustaff 
425 % broken
426 %        \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) 
427          \drummode { \time 6/8
428                 \repeat "unfold" 2 { tamb8. tamb16 tamb8 tamb tamb tamb | }
429                 tamb4. tamb8 tamb tamb | tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan |
430                 %% the trick with the scaled duration and the shorter rest is neccessary for the correct ending of the trill-span!
431                                  }
432                                          }
433
434 @end lilypond 
435 Music for Tam-Tam (entered with "tt"):
436
437 @lilypond[quote,verbatim]
438  #(define mydrums '(
439          (tamtam     default   #t      0) ) )
440         tamtamstaff = { \override Staff.StaffSymbol #'line-positions = #'( 0 )   
441                 \override Staff.BarLine #'bar-size  = #3 
442         \set DrumStaff.instrumentName="Tamtam"}
443  \new DrumStaff {
444          \tamtamstaff
445          \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) 
446          \drummode { tt 1 \pp \laissezVibrer 
447                                  } 
448                                          }
449 @end lilypond
450
451 Two different bells, entered with "cb" (cowbell) and "rb" (ridebell)" 
452
453 @lilypond[quote,verbatim]
454 %% bells are enterd with:
455 % "cb" (cowbell) and "rb" (ridebell)" 
456  #(define mydrums '(
457          (ridebell     default   #t        3 )
458          (cowbell       default   #t        -2)))
459         
460          bellstaff = { \override DrumStaff.StaffSymbol #'line-positions = #'(-2 3)  
461                  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) 
462          \override Staff.BarLine #'bar-size  = #3   
463          \set DrumStaff.instrumentName="Different Bells"}
464  
465  \new DrumStaff  {
466          \bellstaff
467          \drummode {
468         \time 2/4
469         \repeat "unfold" 2 { rb 8 rb cb cb16  rb ~ -> | rb16  rb 8 rb 16 cb 8 cb | }
470          }
471 }
472 @end lilypond
473
474 Here an short example by maestro Stravinsky (from "L'hostire du Soldat")
475
476 @lilypond[quote,verbatim]
477  #(define mydrums '(
478           (bassdrum         default #t 4 ) 
479          (snare              default #t -4 )
480          (tambourine     default   #t      0) ) )
481          
482  global = { \time 3/8 s 4. \time 2/4 s 2 *2 \time 3/8 s 4. \time 2/4 s 2 }
483          
484 drumsA = { \context DrumVoice << {  \global }
485         {\drummode { 
486   \autoBeamOff 
487 \stemDown sn 8 \stemUp tamb s8 |
488                  sn4 \stemDown sn4  |
489 \stemUp tamb 8 \stemDown sn8 \stemUp sn16 \stemDown sn \stemUp sn8   |
490 \stemDown sn 8 \stemUp tamb s8 |
491 \stemUp sn4 s8 \stemUp tamb |
492         } } >> }
493 drumsB = { \drummode { s 4 bd 8 s 2*2 s 4 bd8 s 4 bd8 s 8 } }
494          
495 \layout {
496                 indent = #40
497
498
499  \score { 
500  \new StaffGroup
501  <<
502  \new DrumStaff 
503  {  \set DrumStaff.instrumentName= \markup { \column { "Tambourine" "et" "caisse claire s. timbre" } }
504  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drumsA } 
505  \new DrumStaff 
506  { \set DrumStaff.instrumentName= "Grosse Caisse"
507  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drumsB } 
508  >> 
509
510  }
511 @end lilypond
512
513 @seealso
514
515 Snippets: @rlsr{Percussion}.
516
517 Internals Reference: @rinternals{DrumStaff}, @rinternals{DrumVoice}.
518
519
520
521 @c TODO: check name -gp
522 @node Ghost notes
523 @subsubsection Ghost notes
524
525 Ghost notes for drums and percussion may be created using the
526 @code{\parenthesize} command detailed in @ref{Parentheses}.
527 However, the default @code{\drummode} does not include the
528 @code{Parenthesis_engraver} plugin which allows this.
529
530 @lilypond[quote,ragged-right,verbatim,fragment]
531 \new DrumStaff \with {
532   \consists "Parenthesis_engraver"
533 } <<
534   \context DrumVoice  = "1"  { s1 *2 }
535   \context DrumVoice  = "2" { s1 *2 }
536   \drummode {
537     <<
538       {
539         hh8[ hh] <hh sn> hh16
540         < \parenthesize sn > hh
541         < \parenthesize sn > hh8 <hh sn> hh
542       } \\ {
543         bd4 r4 bd8 bd r8 bd
544       }
545     >>
546   }
547 >>
548 @end lilypond
549
550 @noindent
551 Also note that you must add chords (@code{< >} brackets)
552 around each @code{\parenthesize} statement.
553
554 @seealso
555
556 Snippets: @rlsr{Percussion}.
557
558