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