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