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