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