1 @c -*- coding: utf-8; mode: texinfo; -*-
6 Rhythmic music is primarily used for percussion and drum notation, but it can
7 also be used to show the rhythms of melodies.
10 * Showing melody rhythms::
11 * Entering percussion::
17 @anchor{Showing melody rhythms}
18 @unnumberedsubsubsec Showing melody rhythms
20 Sometimes you might want to show only the rhythm of a melody. This
21 can be done with the rhythmic staff. All pitches of notes on such a
22 staff are squashed, and the staff itself has a single line
24 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
27 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
33 Program reference: @internalsref{RhythmicStaff}.
36 @anchor{Entering percussion}
37 @unnumberedsubsubsec Entering percussion
43 Percussion notes may be entered in @code{\drummode} mode, which is
44 similar to the standard mode for entering notes. Each piece of
45 percussion has a full name and an abbreviated name, and both can be used
48 @lilypond[quote,ragged-right,verbatim]
54 The complete list of drum names is in the init file
55 @file{ly/@/drumpitch@/-init@/.ly}.
56 @c TODO: properly document this.
60 Program reference: @internalsref{note-event}.
62 @anchor{Percussion staves}
63 @unnumberedsubsubsec Percussion staves
67 A percussion part for more than one instrument typically uses a
68 multiline staff where each position in the staff refers to one piece
72 To typeset the music, the notes must be interpreted in a
73 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
75 @lilypond[quote,ragged-right,verbatim]
76 up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
77 down = \drummode { bassdrum4 snare8 bd r bd sn4 }
79 \new DrumVoice { \voiceOne \up }
80 \new DrumVoice { \voiceTwo \down }
84 The above example shows verbose polyphonic notation. The short
85 polyphonic notation, described in @ref{Basic polyphony}, can also be used if
86 the @internalsref{DrumVoice}s are instantiated by hand first. For example,
88 @lilypond[quote,ragged-right,fragment,verbatim]
90 \new DrumVoice = "1" { s1 *2 }
91 \new DrumVoice = "2" { s1 *2 }
95 { \repeat unfold 16 hh16 }
104 There are also other layout possibilities. To use these, set the
105 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
106 The following variables have been predefined
110 This is the default. It typesets a typical drum kit on a five-line staff
112 @lilypond[quote,line-width=10.0\cm]
114 cymc cyms cymr hh hhc hho hhho hhp
115 cb hc bd sn ss tomh tommh tomml toml tomfh tomfl }
117 cymc cyms cymr hh hhc hho hhho hhp \break
118 cb hc bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
120 << \new DrumStaff \with {
122 \remove Time_signature_engraver
123 \override Stem #'transparent = ##t
124 \override Stem #'Y-extent-callback = ##f
125 \override VerticalAxisGroup #'minimum-Y-extent = #'(-4.0 . 5.0)
132 \override LyricText #'font-family = #'typewriter
133 \override BarNumber #'transparent =##T
139 The drum scheme supports six different toms. When there are fewer toms,
140 simply select the toms that produce the desired result, i.e., to get toms
141 on the three middle lines you use @code{tommh}, @code{tomml}, and
145 This typesets timbales on a two line staff
147 @lilypond[quote,ragged-right]
148 nam = \lyricmode { timh ssh timl ssl cb }
149 mus = \drummode { timh ssh timl ssl cb s16 }
152 \new DrumStaff \with {
154 \remove Time_signature_engraver
155 \override Stem #'transparent = ##t
156 \override Stem #'Y-extent-callback = ##f
157 \override StaffSymbol #'line-count = #2
158 \override StaffSymbol #'staff-space = #2
159 \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.0 . 4.0)
160 drumStyleTable = #timbales-style
163 \override LyricText #'font-family = #'typewriter
170 This typesets congas on a two line staff
172 @lilypond[quote,ragged-right]
173 nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl }
174 mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
177 \new DrumStaff \with {
179 \remove Time_signature_engraver
180 drumStyleTable = #congas-style
181 \override StaffSymbol #'line-count = #2
183 %% this sucks; it will lengthen stems.
184 \override StaffSymbol #'staff-space = #2
185 \override Stem #'transparent = ##t
186 \override Stem #'Y-extent-callback = ##f
189 \override LyricText #'font-family = #'typewriter
196 This typesets bongos on a two line staff
198 @lilypond[quote,ragged-right]
199 nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl }
200 mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 }
203 \new DrumStaff \with {
205 \remove Time_signature_engraver
206 \override StaffSymbol #'line-count = #2
207 drumStyleTable = #bongos-style
209 %% this sucks; it will lengthen stems.
210 \override StaffSymbol #'staff-space = #2
211 \override Stem #'transparent = ##t
212 \override Stem #'Y-extent-callback = ##f
215 \override LyricText #'font-family = #'typewriter
221 @item percussion-style
222 To typeset all kinds of simple percussion on one line staves.
224 @lilypond[quote,ragged-right]
225 nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc }
226 mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
229 \new DrumStaff \with{
231 drumStyleTable = #percussion-style
232 \override StaffSymbol #'line-count = #1
233 \remove Time_signature_engraver
234 \override Stem #'transparent = ##t
235 \override Stem #'Y-extent-callback = ##f
238 \override LyricText #'font-family = #'typewriter
245 If you do not like any of the predefined lists you can define your own
246 list at the top of your file
248 @lilypond[quote,ragged-right,verbatim]
250 (bassdrum default #f -1)
253 (pedalhihat xcircle "stopped" 2)
254 (lowtom diamond #f 3)))
255 up = \drummode { hh8 hh hh hh hhp4 hhp }
256 down = \drummode { bd4 sn bd toml8 toml }
259 \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
260 \new DrumVoice { \voiceOne \up }
261 \new DrumVoice { \voiceTwo \down }
268 Init files: @file{ly/@/drumpitch@/-init@/.ly}.
270 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
274 Because general MIDI does not contain rim shots, the sidestick is used
275 for this purpose instead.
278 @c FIXME: check name -gp
280 @unnumberedsubsubsec Ghost notes
282 Ghost notes for drums and percussion may be created using the
283 @code{\parenthesize} command detailed in @ref{Parentheses}. However,
284 the default @code{\drummode} does
285 not include the @code{Parenthesis_engraver} plugin which allows
287 must add the plugin explicitly in the context definition as
288 detailed in @ref{Changing context properties on the fly}.
290 @lilypond[quote,ragged-right,verbatim,fragment]
291 \new DrumStaff \with {
292 \consists "Parenthesis_engraver"
294 \context DrumVoice = "1" { s1 *2 }
295 \context DrumVoice = "2" { s1 *2 }
299 hh8[ hh] <hh sn> hh16
300 < \parenthesize sn > hh < \parenthesize
311 Also note that you must add chords (@code{< >} brackets)
312 around each @code{\parenthesize} statement.