From 5f4233b40c5a3bdce0eeb6f362f72c50817ee646 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Sun, 17 Aug 2008 17:06:08 -0700 Subject: [PATCH] Fixes to Percussion. --- Documentation/user/input.itely | 87 ++++++++--- Documentation/user/percussion.itely | 302 +++++++++++++++++++++--------------- 2 files changed, 242 insertions(+), 147 deletions(-) diff --git a/Documentation/user/input.itely b/Documentation/user/input.itely index 8be7691a17..03fdba03fe 100644 --- a/Documentation/user/input.itely +++ b/Documentation/user/input.itely @@ -16,11 +16,11 @@ This section deals with general LilyPond input and output issues, rather than specific notation. @menu -* Input structure:: -* Titles and headers:: -* Working with input files:: -* Controlling output:: -* MIDI output:: +* Input structure:: +* Titles and headers:: +* Working with input files:: +* Controlling output:: +* MIDI output:: @end menu @@ -31,9 +31,9 @@ The main format of input for LilyPond are text files. By convention, these files end with @code{.ly}. @menu -* Structure of a score:: -* Multiple scores in a book:: -* File structure:: +* Structure of a score:: +* Multiple scores in a book:: +* File structure:: @end menu @@ -337,10 +337,10 @@ Almost all printed music includes a title and the composer's name; some pieces include a lot more information. @menu -* Creating titles:: -* Custom titles:: -* Reference to page numbers:: -* Table of contents:: +* Creating titles:: +* Custom titles:: +* Reference to page numbers:: +* Table of contents:: @end menu @@ -760,10 +760,10 @@ Init files: @file{../ly/@/toc@/-init@/.ly}. @section Working with input files @menu -* Including LilyPond files:: -* Different editions from one source:: -* Text encoding:: -* Displaying LilyPond notation:: +* Including LilyPond files:: +* Different editions from one source:: +* Text encoding:: +* Displaying LilyPond notation:: @end menu @@ -885,8 +885,8 @@ the structure of the score will make it easier to change the structure while leaving the notation untouched. @menu -* Using variables:: -* Using tags:: +* Using variables:: +* Using tags:: @end menu @node Using variables @@ -1224,8 +1224,8 @@ lilypond file.ly >display.txt @section Controlling output @menu -* Extracting fragments of music:: -* Skipping corrected music:: +* Extracting fragments of music:: +* Skipping corrected music:: @end menu @node Extracting fragments of music @@ -1332,11 +1332,12 @@ settings. Therefore the midi file should not have more than 15 staves (or 14 if you do not use drums). Other staves will remain silent. @menu -* Creating MIDI files:: -* MIDI block:: -* What goes into the MIDI output?:: -* Repeats in MIDI:: -* Controlling MIDI dynamics:: +* Creating MIDI files:: +* MIDI block:: +* What goes into the MIDI output?:: +* Repeats in MIDI:: +* Controlling MIDI dynamics:: +* Percussion in MIDI:: @end menu @node Creating MIDI files @@ -1866,4 +1867,40 @@ copied out and compiled to test microtones in your MIDI player. @end ignore +@node Percussion in MIDI +@subsection Percussion in MIDI + +@c FIXME: sorry Trevor, I know this is a complete mess. :( + +But You should be aware, that some percussion sounds cannot be +reached via the @code{DrumStaff} context. Pitched percussion +sounds, like +Xylophone, Marimaphone, Vibraphone, Timpani, etc. are treated like +"normal" instruments and You should input music for these +instruments in a @code{Staff} context, not in a @code{DrumStaff} +context. +Too make it more complicated: +some non pitched percussion sounds of the general midi standard, +like "melodic-tom", "taiko-drum" "synth drum", etc. cannot +be reached via midi-channel 10, so You should also use for them a +@code{ Staff} context, with "normal" pitches. And, last but not +least, +it should be mentioned, that there are lots of percussion +instruments, which are note part of the general midi standard. +If You want to write for e.g. castanets, You have to find a +substitution for this sound (or have a good sampler). +But let us forget for this moment the limitations of midi and let +us go on with some more examples, that show You how to write +for percussion instruments with Lilypond: + +@c (no, seriously, there was no example here. I didn't just forget +@c to copy it. -gp) + + + +@knownissues + +Because general MIDI does not contain rim shots, the sidestick is +used for this purpose instead. + diff --git a/Documentation/user/percussion.itely b/Documentation/user/percussion.itely index 12577dfbdb..717e924df3 100644 --- a/Documentation/user/percussion.itely +++ b/Documentation/user/percussion.itely @@ -12,7 +12,7 @@ @section Percussion @menu -* Common notation for percussion:: +* Common notation for percussion:: @end menu @node Common notation for percussion @@ -22,22 +22,39 @@ Rhythmic music is primarily used for percussion and drum notation, but it can also be used to show the rhythms of melodies. @menu -* References for percussion:: -* Basic percussion notation:: -* Percussion staves:: -* Ghost notes:: +* References for percussion:: +* Basic percussion notation:: +* Drum rolls:: +* Pitched percussion:: +* Percussion staves:: +* Custom percussion staves:: +* Ghost notes:: @end menu @node References for percussion @subsubsection References for percussion -@c TODO Add refs -TBC +TODO add more. +@itemize + +@item Some percussion may be notated on a rhythmic staff; this is +discussed in @ref{Showing melody rhythms}, and +@ref{Instantiating new staves}. + +@item MIDI output is discussed in a separate section; please see +@ref{Percussion in MIDI}. + +@end itemize @seealso -Internals Reference: @rinternals{RhythmicStaff}. +Notation Reference: +@ref{Showing melody rhythms}, +@ref{Instantiating new staves}. +@ref{Percussion in MIDI}. + +Snippets: @rlsr{Percussion}. @node Basic percussion notation @@ -46,68 +63,66 @@ Internals Reference: @rinternals{RhythmicStaff}. @cindex percussion @cindex drums - Percussion notes may be entered in @code{\drummode} mode, which is -similar to the standard mode for entering notes. Each piece of -percussion has a full name and an abbreviated name, and both can -be used in input files. The simplest way to enter percussion notes -is to use the @code{\drums} command, which creates the correct -context and entry mode for percussion: +similar to the standard mode for entering notes. The simplest way +to enter percussion notes is to use the @code{\drums} command, +which creates the correct context and entry mode for percussion: -@lilypond[quote,ragged-right,verbatim] +@lilypond[quote,verbatim] \drums { - hihat hh bassdrum bd + hihat4 hh bassdrum bd } @end lilypond This is shorthand for: -@lilypond[quote,ragged-right,verbatim] +@lilypond[quote,verbatim] \new DrumStaff { \drummode { - hihat hh bassdrum bd + hihat4 hh bassdrum bd } } @end lilypond -Note, that percussion clefs are added automatically in a -@code{DrumStaff} context. But it is possible to use other clefs -if you want. -If You find it too much work to input Your music with these not easy to recognize shortcuts, You could input first -the music with "normal" pitches and later You can change these -to percussion pitches witch the search and select function of Your favorite text editor. But please use letters that You don't use -in Your commands! Otherwise everything gets confused. -You can find the complete list of drum names and there abbreviations is in the init file -@rinternals{Appendix B} -Later on, right in this section, You will find some examples, wich show You how You can enter music for the most important percussion intruments. -Note that the normal notation of pitches (like e.g. cis 4) in a @code{DrumStaff} context will cause an error message! -These notes will be also correctly played by midi. -But You should be aware, that some percussion sounds cannot be reached via the @code{DrumStaff} context. Pitched percussion sounds, like -Xylophone, Marimaphone, Vibraphone, Timpani, etc. are treated like "normal" instruments and You should input music for these -instruments in a @code{Staff} context, not in a @code{DrumStaff} context. -Too make it more complicated: -some non pitched percussion sounds of the general midi standard, like "melodic-tom", "taiko-drum" "synth drum", etc. cannot -be reached via midi-channel 10, so You should also use for them a @code{ Staff} context, with "normal" pitches. And, last but not least, -it should be mentioned, that there are lots of percussion instruments, which are note part of the general midi standard. -If You want to write for e.g. castanets, You have to find a substitution for this sound (or have a good sampler). -But let us forget for this moment the limitations of midi and let us go on with some more examples, that show You how to write -for percussion instruments with Lilypond: -Drum rolls are indicated with three slashes across the stem. -For quarter notes or longer the three slashes are shown explicitly, -eighth notes are shown with two slashes (the beam being the third), -and drum rolls shorter than eighths have one stem slash to +Each piece of percussion has a full name and an abbreviated name, +and both can be used in input files. The full list of percussion +note names may be found in @ref{Percussion notes}. + +Note that the normal notation of pitches (such as @code{cis4}) in +a @code{DrumStaff} context will cause an error message. +Percussion clefs are added automatically to a @code{DrumStaff} +contex, but other clefs may also be used. + +There are a few issues concerning MIDI support for percussion +instruments; for details please see @ref{Percussion in MIDI}. + +@seealso + +Notation Reference: @ref{Percussion in MIDI}, @ref{Percussion notes}. + +File: @file{ly/@/drumpitch@/-init@/.ly} + +Snippets: @rlsr{Percussion}. + + +@node Drum rolls +@subsubsection Drum rolls + +Drum rolls are indicated with three slashes across the stem. For +quarter notes or longer the three slashes are shown explicitly, +eighth notes are shown with two slashes (the beam being the +third), and drum rolls shorter than eighths have one stem slash to supplement the beams. This is achieved with the tremolo notation, -@code{:32}, see @ref{Tremolo repeats}. Here's an example of -some snare rolls: +@code{:32}, as described in @ref{Tremolo repeats}. Here is an +example of some snare rolls: -@lilypond[quote,ragged-right,verbatim] -\new DrumStaff -\drummode { +@lilypond[quote,verbatim] +\drums { \time 2/4 - sn16 sn8 sn16 sn8 sn8:32~ | - sn8 sn8 sn4:32~ | - sn4 sn8 sn16 sn16 | - sn4 r4 | + sn16 sn8 sn16 sn8 sn8:32 ~ + sn8 sn8 sn4:32 ~ + sn4 sn8 sn16 sn16 + sn4 r4 } @end lilypond @@ -115,68 +130,90 @@ Sticking can be indicated by placing @code{^"R"} or @code{^"L"} after the note. The @code{staff-padding} property may be overridden to achieve a pleasing baseline. -@lilypond[quote,ragged-right,verbatim] +@lilypond[quote,verbatim] \drums { - \repeat "unfold" 2 { sn16 ^"L" sn^"R" sn^"L" sn^"L" sn^"R" sn^"L" sn^"R" sn^"R" } - + \repeat unfold 2 { + sn16 ^"L" sn^"R" sn^"L" sn^"L" sn^"R" sn^"L" sn^"R" sn^"R" + } } @end lilypond +@seealso + +Snippets: @rlsr{Percussion}. + + +@node Pitched percussion +@subsubsection Pitched percussion + +Certain pitched percussion instruments (e.g. xylophone, +vibraphone, and timpani) are written using with normal staffs. +This is covered in other sections of the manual. @seealso -Internals Reference: @rinternals{note-event}. -@seealso @file{ly/@/drumpitch@/-init@/.ly} +@c TODO: possibly link to an alternate section of NR 3.5, if +@c "percussion in MIDI" gets a separate subsubsection for +@c pitched percussion sounds. -gp +Notation Reference: @ref{Percussion in MIDI}. + +Snippets: @rlsr{Percussion}. + + @node Percussion staves @subsubsection Percussion staves + @cindex percussion @cindex drums A percussion part for more than one instrument typically uses a -multiline staff where each position in the staff refers to one piece -of percussion. - +multiline staff where each position in the staff refers to one +piece of percussion. To typeset the music, the notes must be +interpreted in @code{DrumStaff} and @code{DrumVoice} context. -To typeset the music, the notes must be interpreted in a -@rinternals{DrumStaff} and @rinternals{DrumVoice} contexts - -@lilypond[quote,ragged-right,verbatim] -up = \drummode { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat } -down = \drummode { bassdrum4 snare8 bd r bd sn4 } - \new DrumStaff << - \new DrumVoice { \voiceOne \up } - \new DrumVoice { \voiceTwo \down } - >> +@lilypond[quote,verbatim] +up = \drummode { + crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat +} +down = \drummode { + bassdrum4 snare8 bd r bd sn4 +} +\new DrumStaff << + \new DrumVoice { \voiceOne \up } + \new DrumVoice { \voiceTwo \down } +>> @end lilypond The above example shows verbose polyphonic notation. The short polyphonic notation, described in @rlearning{I'm hearing Voices}, -can also be used if the @rinternals{DrumVoice}s are instantiated -by hand first. For example, +can also be used if the voices are instantiated by hand first. +For example, -@lilypond[quote,ragged-right,fragment,verbatim] +@lilypond[quote,verbatim] \new DrumStaff << - \new DrumVoice = "1" { s1 *2 } - \new DrumVoice = "2" { s1 *2 } + \new DrumVoice = "1" { s1*2 } + \new DrumVoice = "2" { s1*2 } \drummode { bd4 sn4 bd4 sn4 - << - { \repeat unfold 16 hh16 } - \\ - { bd4 sn4 bd4 sn4 } - >> + << { + \repeat unfold 16 hh16 + } \\ { + bd4 sn4 bd4 sn4 + } >> } >> @end lilypond - There are also other layout possibilities. To use these, set the -property @code{drumStyleTable} in context @rinternals{DrumVoice}. -The following variables have been predefined +property @code{drumStyleTable} in context @code{DrumVoice}. The +following variables have been predefined: +@c FIXME: decide what to do about this table. (ie verbatim or not) @table @code + @item drums-style -This is the default. It typesets a typical drum kit on a five-line staff +This is the default. It typesets a typical drum kit on a +five-line staff: @lilypond[quote,line-width=10.0\cm] nam = \lyricmode { @@ -205,13 +242,13 @@ mus = \drummode { } @end lilypond -The drum scheme supports six different toms. When there are fewer toms, -simply select the toms that produce the desired result, i.e., to get toms -on the three middle lines you use @code{tommh}, @code{tomml}, and -@code{tomfh}. +The drum scheme supports six different toms. When there are fewer +toms, simply select the toms that produce the desired result. For +example, to get toms on the three middle lines you use +@code{tommh}, @code{tomml}, and @code{tomfh}. @item timbales-style -This typesets timbales on a two line staff +This typesets timbales on a two line staff: @lilypond[quote,ragged-right] nam = \lyricmode { timh ssh timl ssl cb } @@ -236,7 +273,7 @@ mus = \drummode { timh ssh timl ssl cb s16 } @end lilypond @item congas-style -This typesets congas on a two line staff +This typesets congas on a two line staff: @lilypond[quote,ragged-right] nam = \lyricmode { cgh cgho cghm ssh cgl cglo cglm ssl } @@ -262,7 +299,7 @@ mus = \drummode { cgh cgho cghm ssh cgl cglo cglm ssl s16 } @end lilypond @item bongos-style -This typesets bongos on a two line staff +This typesets bongos on a two line staff: @lilypond[quote,ragged-right] nam = \lyricmode { boh boho bohm ssh bol bolo bolm ssl } @@ -288,7 +325,7 @@ mus = \drummode { boh boho bohm ssh bol bolo bolm ssl s16 } @end lilypond @item percussion-style -To typeset all kinds of simple percussion on one line staves. +To typeset all kinds of simple percussion on one line staves: @lilypond[quote,ragged-right] nam = \lyricmode { tri trio trim gui guis guil cb cl tamb cab mar hc } @@ -311,10 +348,14 @@ mus = \drummode { tri trio trim gui guis guil cb cl tamb cab mar hc s16 } @end lilypond @end table -If you do not like any of the predefined lists you can define your own -list at the top of your file. -@lilypond[quote,ragged-right,verbatim] +@node Custom percussion staves +@subsubsection Custom percussion staves + +If you do not like any of the predefined lists you can define your +own list at the top of your file. + +@lilypond[quote,verbatim] #(define mydrums '( (bassdrum default #f -1) (snare default #f 0) @@ -330,13 +371,18 @@ down = \drummode { bd4 sn bd toml8 toml } \new DrumVoice { \voiceTwo \down } >> @end lilypond -You should use this possbility, if You want to write e.g. for an custom made setup of percussion instruments. -In contemporary music different percussion instruments, even played by only one highly skilled player, will not be written on one but -on many staves. If You have something like this in mind, You have to define Your own drum (or better expressed: percussion) tables. + + +@snippets + +FIXME: MOVE ALL THESE TO LSR! -gp + Here are some examples: + Two Woodblocks, entered with wbh (high woodblock) and wbl (low woodblock) - @lilypond - #(define mydrums '( + +@lilypond[quote,verbatim] +#(define mydrums '( (hiwoodblock default #t 3) (lowoodblock default #t -2))) %% These lines define the position of the woodblocks in the stave, if You like, You can change it @@ -357,19 +403,27 @@ Two Woodblocks, entered with wbh (high woodblock) and wbl (low woodblock) } } @end lilypond + @seealso -Note that in this special case the length of the barline must altered with @code{ \override Staff.BarLine #'bar-size #number}. -Otherwise it would be too short. And You have also to define the positions of the to stafflines. -For more information about these delicate things have a look at @internals{ Staff symbol} + +Note that in this special case the length of the barline must +altered with @code{\override Staff.BarLine #'bar-size #number}. +Otherwise it would be too short. And You have also to define the +positions of the to stafflines. For more information about these +delicate things have a look at @ref{Staff symbol}. + + A tambourine, entered with "tamb": -@lilypond + +@lilypond[quote,verbatim] % tambourine-music is entered with "tamb" tambustaff = { \override Staff.StaffSymbol #'line-positions = #'( 0 ) \override Staff.BarLine #'bar-size = #3 \set DrumStaff.instrumentName="Tambourine"} \new DrumStaff { \tambustaff - \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) +% broken +% \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drummode { \time 6/8 \repeat "unfold" 2 { tamb8. tamb16 tamb8 tamb tamb tamb | } tamb4. tamb8 tamb tamb | tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan | @@ -379,7 +433,8 @@ A tambourine, entered with "tamb": @end lilypond Music for Tam-Tam (entered with "tt"): -@lilypond + +@lilypond[quote,verbatim] #(define mydrums '( (tamtam default #t 0) ) ) tamtamstaff = { \override Staff.StaffSymbol #'line-positions = #'( 0 ) @@ -392,8 +447,10 @@ Music for Tam-Tam (entered with "tt"): } } @end lilypond + Two different bells, entered with "cb" (cowbell) and "rb" (ridebell)" -@lilypond + +@lilypond[quote,verbatim] %% bells are enterd with: % "cb" (cowbell) and "rb" (ridebell)" #(define mydrums '( @@ -413,8 +470,10 @@ Two different bells, entered with "cb" (cowbell) and "rb" (ridebell)" } } @end lilypond + Here an short example by maestro Stravinsky (from "L'hostire du Soldat") -@lilypond + +@lilypond[quote,verbatim] #(define mydrums '( (bassdrum default #t 4 ) (snare default #t -4 ) @@ -450,16 +509,13 @@ drumsB = { \drummode { s 4 bd 8 s 2*2 s 4 bd8 s 4 bd8 s 8 } } } @end lilypond -Init files: @file{ly/@/drumpitch@/-init@/.ly}. -With some tricks it is even possible to create symbols for percussion beaters: -%%% I'm waiting for the mail of Valentin, the link to his example has broken. -Internals Reference: @rinternals{DrumStaff}, @rinternals{DrumVoice}. +@seealso -@knownissues +Snippets: @rlsr{Percussion}. + +Internals Reference: @rinternals{DrumStaff}, @rinternals{DrumVoice}. -Because general MIDI does not contain rim shots, the sidestick is used -for this purpose instead. @c TODO: check name -gp @@ -467,10 +523,9 @@ for this purpose instead. @subsubsection Ghost notes Ghost notes for drums and percussion may be created using the -@code{\parenthesize} command detailed in @ref{Parentheses}. However, -the default @code{\drummode} does -not include the @code{Parenthesis_engraver} plugin which allows -this. +@code{\parenthesize} command detailed in @ref{Parentheses}. +However, the default @code{\drummode} does not include the +@code{Parenthesis_engraver} plugin which allows this. @lilypond[quote,ragged-right,verbatim,fragment] \new DrumStaff \with { @@ -482,8 +537,8 @@ this. << { hh8[ hh] hh16 - < \parenthesize sn > hh < \parenthesize - sn > hh8 hh + < \parenthesize sn > hh + < \parenthesize sn > hh8 hh } \\ { bd4 r4 bd8 bd r8 bd } @@ -496,5 +551,8 @@ this. Also note that you must add chords (@code{< >} brackets) around each @code{\parenthesize} statement. +@seealso + +Snippets: @rlsr{Percussion}. -- 2.11.4.GIT