1 @c -*- coding: utf-8; mode: texinfo; -*-
7 * TODO percussion node fix::
10 @node TODO percussion node fix
11 @subsection TODO percussion node fix
13 Rhythmic music is primarily used for percussion and drum notation, but it can
14 also be used to show the rhythms of melodies.
17 * Showing melody rhythms::
18 * Entering percussion::
24 @node Showing melody rhythms
25 @unnumberedsubsubsec Showing melody rhythms
27 Sometimes you might want to show only the rhythm of a melody. This
28 can be done with the rhythmic staff. All pitches of notes on such a
29 staff are squashed, and the staff itself has a single line
31 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
34 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
40 Program reference: @internalsref{RhythmicStaff}.
43 @node Entering percussion
44 @unnumberedsubsubsec Entering percussion
50 Percussion notes may be entered in @code{\drummode} mode, which is
51 similar to the standard mode for entering notes. Each piece of
52 percussion has a full name and an abbreviated name, and both can be used
55 @lilypond[quote,ragged-right,verbatim]
61 The complete list of drum names is in the init file
62 @file{ly/@/drumpitch@/-init@/.ly}.
63 @c TODO: properly document this.
67 Program reference: @internalsref{note-event}.
69 @node Percussion staves
70 @unnumberedsubsubsec Percussion staves
74 A percussion part for more than one instrument typically uses a
75 multiline staff where each position in the staff refers to one piece
79 To typeset the music, the notes must be interpreted in a
80 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
82 @lilypond[quote,ragged-right,verbatim]
83 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
84 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
86 \new DrumVoice { \voiceOne \up }
87 \new DrumVoice { \voiceTwo \down }
91 The above example shows verbose polyphonic notation. The short
92 polyphonic notation, described in @rlearning{I'm seeing Voices},
93 can also be used if the @internalsref{DrumVoice}s are instantiated
94 by hand first. For example,
96 @lilypond[quote,ragged-right,fragment,verbatim]
98 \new DrumVoice = "1" { s1 *2 }
99 \new DrumVoice = "2" { s1 *2 }
103 { \repeat unfold 16 hh16 }
112 There are also other layout possibilities. To use these, set the
113 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
114 The following variables have been predefined
118 This is the default. It typesets a typical drum kit on a five-line staff
120 @lilypond[quote,line-width=10.0\cm]
122 cymc cyms cymr hh hhc hho hhho hhp
123 cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
125 cymc cyms cymr hh hhc hho hhho hhp \break
126 cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
128 << \new DrumStaff \with {
130 \remove Time_signature_engraver
131 \override Stem #'transparent = ##t
132 \override Stem #'Y-extent-callback = ##f
133 \override VerticalAxisGroup #'minimum-Y-extent = #'(-4.0 . 5.0)
140 \override LyricText #'font-family = #'typewriter
141 \override BarNumber #'transparent =##T
147 The drum scheme supports six different toms. When there are fewer toms,
148 simply select the toms that produce the desired result, i.e., to get toms
149 on the three middle lines you use @code{tommh}, @code{tomml}, and
153 This typesets timbales on a two line staff
155 @lilypond[quote,ragged-right]
156 nam = \lyricmode { timh ssh timl ssl cb }
157 mus = \drummode { timh ssh timl ssl cb s16 }
160 \new DrumStaff \with {
162 \remove Time_signature_engraver
163 \override Stem #'transparent = ##t
164 \override Stem #'Y-extent-callback = ##f
165 \override StaffSymbol #'line-count = #2
166 \override StaffSymbol #'staff-space = #2
167 \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.0 . 4.0)
168 drumStyleTable = #timbales-style
171 \override LyricText #'font-family = #'typewriter
178 This typesets congas on a two line staff
180 @lilypond[quote,ragged-right]
181 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
182 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
185 \new DrumStaff \with {
187 \remove Time_signature_engraver
188 drumStyleTable = #congas-style
189 \override StaffSymbol #'line-count = #2
191 %% this sucks; it will lengthen stems.
192 \override StaffSymbol #'staff-space = #2
193 \override Stem #'transparent = ##t
194 \override Stem #'Y-extent-callback = ##f
197 \override LyricText #'font-family = #'typewriter
204 This typesets bongos on a two line staff
206 @lilypond[quote,ragged-right]
207 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
208 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
211 \new DrumStaff \with {
213 \remove Time_signature_engraver
214 \override StaffSymbol #'line-count = #2
215 drumStyleTable = #bongos-style
217 %% this sucks; it will lengthen stems.
218 \override StaffSymbol #'staff-space = #2
219 \override Stem #'transparent = ##t
220 \override Stem #'Y-extent-callback = ##f
223 \override LyricText #'font-family = #'typewriter
229 @item percussion-style
230 To typeset all kinds of simple percussion on one line staves.
232 @lilypond[quote,ragged-right]
233 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
234 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
237 \new DrumStaff \with{
239 drumStyleTable = #percussion-style
240 \override StaffSymbol #'line-count = #1
241 \remove Time_signature_engraver
242 \override Stem #'transparent = ##t
243 \override Stem #'Y-extent-callback = ##f
246 \override LyricText #'font-family = #'typewriter
253 If you do not like any of the predefined lists you can define your own
254 list at the top of your file
256 @lilypond[quote,ragged-right,verbatim]
258 (bassdrum default #f -1)
261 (pedalhihat xcircle "stopped" 2)
262 (lowtom diamond #f 3)))
263 up = \drummode { hh8 hh hh hh hhp4 hhp }
264 down = \drummode { bd4 sn bd toml8 toml }
267 \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
268 \new DrumVoice { \voiceOne \up }
269 \new DrumVoice { \voiceTwo \down }
276 Init files: @file{ly/@/drumpitch@/-init@/.ly}.
278 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
282 Because general MIDI does not contain rim shots, the sidestick is used
283 for this purpose instead.
286 @c FIXME: check name -gp
288 @unnumberedsubsubsec Ghost notes
290 Ghost notes for drums and percussion may be created using the
291 @code{\parenthesize} command detailed in @ref{Parentheses}. However,
292 the default @code{\drummode} does
293 not include the @code{Parenthesis_engraver} plugin which allows
295 must add the plugin explicitly in the context definition as
296 detailed in @ref{Changing context properties on the fly}.
298 @lilypond[quote,ragged-right,verbatim,fragment]
299 \new DrumStaff \with {
300 \consists "Parenthesis_engraver"
302 \context DrumVoice = "1" { s1 *2 }
303 \context DrumVoice = "2" { s1 *2 }
307 hh8[ hh] <hh sn> hh16
308 < \parenthesize sn > hh < \parenthesize
319 Also note that you must add chords (@code{< >} brackets)
320 around each @code{\parenthesize} statement.