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