]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/percussion.itely
9a4c0757d33c1bf56a87e0f4057dbd37b0dbfef4
[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.17.30"
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 4 4 4
104   \clef treble
105   hh4 4 4 4
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 8 16 8 8:32 ~
139   8 8 4:32 ~
140   4 8 16 16
141   4 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" 16^"R" 16^"L" 16^"L" 16^"R" 16^"L" 16^"R" 16^"R"
154     \stemUp
155     sn16_"L" 16_"R" 16_"L" 16_"L" 16_"R" 16_"L" 16_"R" 16_"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        \hide Stem
251        \override Stem.Y-extent = ##f
252      } \mus
253      \new Lyrics \nam
254   >>
255   \layout {
256     \context {
257       \Score
258       \override LyricText.font-family = #'typewriter
259       \override BarNumber.transparent =##T
260     }
261   }
262 }
263 @end lilypond
264
265 The drum scheme supports six different toms.  When there are fewer
266 toms, simply select the toms that produce the desired result.  For
267 example, to get toms on the three middle lines you use
268 @code{tommh}, @code{tomml}, and @code{tomfh}.
269
270 @item agostini-drums-style
271 Invented by the French percussionist Dante Agostini in 1965, this notation is
272 commonly employed in France but also elsewhere.
273
274 @lilypond[quote,line-width=10.0\cm]
275 nam = \lyricmode {
276   cymc cyms cymr hh hhc hho hhho hhp
277   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
278 mus = \drummode {
279   cymc cyms cymr hh hhc hho hhho hhp \break
280   cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
281 \score {
282   << \new DrumStaff \with {
283        \remove "Bar_engraver"
284        \remove "Time_signature_engraver"
285        \hide Stem
286        \override Stem.Y-extent = ##f
287        drumStyleTable = #agostini-drums-style
288      } \mus
289      \new Lyrics \nam
290   >>
291   \layout {
292     \context {
293       \Score
294       \override LyricText.font-family = #'typewriter
295       \override BarNumber.transparent =##T
296     }
297   }
298 }
299 @end lilypond
300
301 @item timbales-style
302 This typesets timbales on a two line staff:
303
304 @lilypond[quote,ragged-right]
305 nam = \lyricmode { timh ssh timl ssl cb }
306 mus = \drummode { timh ssh timl ssl cb s16 }
307
308 <<
309   \new DrumStaff \with {
310     \remove "Bar_engraver"
311     \remove "Time_signature_engraver"
312     \hide Stem
313     \override Stem.Y-extent = ##f
314     \override StaffSymbol.line-count = #2
315     \override StaffSymbol.staff-space = #2
316     \override VerticalAxisGroup.minimum-Y-extent = #'(-3.0 . 4.0)
317     drumStyleTable = #timbales-style
318   } \mus
319   \new Lyrics {
320     \override LyricText.font-family = #'typewriter
321     \nam
322   }
323 >>
324 @end lilypond
325
326 @item congas-style
327 This typesets congas on a two line staff:
328
329 @lilypond[quote,ragged-right]
330 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
331 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
332
333 <<
334   \new DrumStaff \with {
335     \remove "Bar_engraver"
336     \remove "Time_signature_engraver"
337     drumStyleTable = #congas-style
338     \override StaffSymbol.line-count = #2
339
340     %% this sucks; it will lengthen stems.
341     \override StaffSymbol.staff-space = #2
342     \hide Stem
343     \override Stem.Y-extent = ##f
344   } \mus
345   \new Lyrics {
346     \override LyricText.font-family = #'typewriter
347     \nam
348   }
349 >>
350 @end lilypond
351
352 @item bongos-style
353 This typesets bongos on a two line staff:
354
355 @lilypond[quote,ragged-right]
356 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
357 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
358
359 <<
360   \new DrumStaff \with {
361     \remove "Bar_engraver"
362     \remove "Time_signature_engraver"
363     \override StaffSymbol.line-count = #2
364     drumStyleTable = #bongos-style
365
366     %% this sucks; it will lengthen stems.
367     \override StaffSymbol.staff-space = #2
368     \hide Stem
369     \override Stem.Y-extent = ##f
370   } \mus
371   \new Lyrics {
372     \override LyricText.font-family = #'typewriter
373     \nam
374   }
375 >>
376 @end lilypond
377
378 @item percussion-style
379 To typeset all kinds of simple percussion on one line staves:
380
381 @lilypond[quote,ragged-right]
382 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
383 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
384
385 <<
386   \new DrumStaff \with{
387     \remove "Bar_engraver"
388     drumStyleTable = #percussion-style
389     \override StaffSymbol.line-count = #1
390     \remove "Time_signature_engraver"
391     \hide Stem
392     \override Stem.Y-extent = ##f
393   } \mus
394   \new Lyrics {
395     \override LyricText.font-family = #'typewriter
396     \nam
397   }
398 >>
399 @end lilypond
400 @end table
401
402
403 @node Custom percussion staves
404 @unnumberedsubsubsec Custom percussion staves
405
406 If you do not like any of the predefined lists you can define your
407 own list at the top of your file.
408
409 @lilypond[quote,verbatim]
410 #(define mydrums '(
411          (bassdrum        default   #f           -1)
412          (snare           default   #f           0)
413          (hihat           cross     #f           1)
414          (halfopenhihat   cross     "halfopen"   1)
415          (pedalhihat      xcircle   "stopped"    2)
416          (lowtom          diamond   #f           3)))
417 up = \drummode { hh8 hh hhho hhho hhp4 hhp }
418 down = \drummode { bd4 sn bd toml8 toml }
419
420 \new DrumStaff <<
421   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
422   \new DrumVoice { \voiceOne \up }
423   \new DrumVoice { \voiceTwo \down }
424 >>
425 @end lilypond
426
427
428 @snippets
429
430 @c TODO: MOVE ALL THESE TO LSR!  -gp
431
432 Here are some examples:
433
434 Two Woodblocks, entered with wbh (high woodblock) and wbl (low woodblock)
435
436 @lilypond[quote,verbatim]
437 % These lines define the position of the woodblocks in the stave;
438 % if you like, you can change it or you can use special note heads
439 % for the woodblocks.
440 #(define mydrums '((hiwoodblock default #t  3)
441                    (lowoodblock default #t -2)))
442
443 woodstaff = {
444   % This defines a staff with only two lines.
445   % It also defines the positions of the two lines.
446   \override Staff.StaffSymbol.line-positions = #'(-2 3)
447
448   % This is necessary; if not entered, the barline would be too short!
449   \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
450 }
451
452 \new DrumStaff {
453   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
454
455   % with this you load your new drum style table
456   \woodstaff
457
458   \drummode {
459     \time 2/4
460     wbl8 16 16 8-> 8 |
461     wbl8 16 16-> ~ 16 16 r8 |
462   }
463 }
464 @end lilypond
465
466 Note that in this special case the length of the barline must
467 altered with @code{\override Staff.BarLine.bar-extent #'(from . to)}.
468 Otherwise it would be too short.  And you have also to define the
469 positions of the two stafflines.  For more information about these
470 delicate things have a look at @ref{Staff symbol}.
471
472 A tambourine, entered with @q{tamb}:
473
474 @lilypond[quote,verbatim]
475 #(define mydrums '((tambourine default #t 0)))
476
477 tambustaff = {
478   \override Staff.StaffSymbol.line-positions = #'( 0 )
479   \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
480   \set DrumStaff.instrumentName = #"Tambourine"
481 }
482
483 \new DrumStaff {
484   \tambustaff
485   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
486
487   \drummode {
488     \time 6/8
489     tamb8. 16 8 8 8 8 |
490     tamb4. 8 8 8 |
491     % the trick with the scaled duration and the shorter rest
492     % is neccessary for the correct ending of the trill-span!
493     tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan |
494   }
495 }
496 @end lilypond
497
498 Music for Tam-Tam (entered with @q{tt}):
499
500 @lilypond[quote,verbatim]
501 #(define mydrums '((tamtam default #t 0)))
502
503 tamtamstaff = {
504   \override Staff.StaffSymbol.line-positions = #'( 0 )
505   \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
506   \set DrumStaff.instrumentName = #"Tamtam"
507 }
508
509 \new DrumStaff {
510   \tamtamstaff
511   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
512
513   \drummode {
514     tt 1 \pp \laissezVibrer
515   }
516 }
517 @end lilypond
518
519 Two different bells, entered with @q{cb} (cowbell) and @q{rb} (ridebell)
520
521 @lilypond[quote,verbatim]
522 #(define mydrums '((ridebell default #t  3)
523                    (cowbell  default #t -2)))
524
525 bellstaff = {
526   \override DrumStaff.StaffSymbol.line-positions = #'(-2 3)
527   \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
528   \override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
529   \set DrumStaff.instrumentName = #"Different Bells"
530 }
531
532 \new DrumStaff {
533   \bellstaff
534   \drummode {
535     \time 2/4
536     rb8 8 cb8 16 rb16-> ~ |
537     16 8 16 cb8 8 |
538   }
539 }
540 @end lilypond
541
542 Here a short example taken from Stravinsky's @q{L'histoire du Soldat}.
543
544 @lilypond[quote,verbatim]
545 #(define mydrums '((bassdrum   default #t  4)
546                    (snare      default #t -4)
547                    (tambourine default #t  0)))
548
549 global = {
550   \time 3/8 s4.
551   \time 2/4 s2*2
552   \time 3/8 s4.
553   \time 2/4 s2
554 }
555
556 drumsA = {
557   \context DrumVoice <<
558     { \global }
559     { \drummode {
560         \autoBeamOff
561         \stemDown sn8 \stemUp tamb s8 |
562         sn4 \stemDown sn4 |
563         \stemUp tamb8 \stemDown sn8 \stemUp sn16 \stemDown sn \stemUp sn8 |
564         \stemDown sn8 \stemUp tamb s8 |
565         \stemUp sn4 s8 \stemUp tamb
566       }
567     }
568   >>
569 }
570
571 drumsB = {
572   \drummode {
573     s4 bd8 s2*2 s4 bd8 s4 bd8 s8
574   }
575 }
576
577 \layout {
578   indent = #40
579 }
580
581 \score {
582   \new StaffGroup <<
583     \new DrumStaff {
584       \set DrumStaff.instrumentName = \markup {
585         \column {
586           "Tambourine"
587           "et"
588           "caisse claire s. timbre"
589         }
590       }
591       \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
592       \drumsA
593     }
594
595    \new DrumStaff {
596      \set DrumStaff.instrumentName = #"Grosse Caisse"
597      \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
598      \drumsB }
599   >>
600 }
601 @end lilypond
602
603 @seealso
604 Snippets:
605 @rlsr{Percussion}.
606
607 Internals Reference:
608 @rinternals{DrumStaff},
609 @rinternals{DrumVoice}.
610
611
612 @c TODO: check name -gp
613 @node Ghost notes
614 @unnumberedsubsubsec Ghost notes
615
616 Ghost notes for drums and percussion may be created using the
617 @code{\parenthesize} command detailed in @ref{Parentheses}.
618
619 @lilypond[quote,ragged-right,verbatim]
620 \new DrumStaff
621 <<
622   \context DrumVoice  = "1" { s1 }
623   \context DrumVoice  = "2" { s1 }
624   \drummode {
625     <<
626       {
627         hh8[ 8] <hh sn> hh16
628         \parenthesize sn  hh
629         \parenthesize sn  hh8 <hh sn> hh
630       } \\
631       {
632         bd4 r4 bd8 8 r8 bd
633       }
634     >>
635   }
636 >>
637 @end lilypond
638
639 @seealso
640 Snippets:
641 @rlsr{Percussion}.