Node: Percussion staves, Next: , Up: Rhythmic music



Percussion staves

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.

Syntax

Percussion staves are typeset with help of a set of Scheme functions. The system is based on the general MIDI drum-pitches. Include drumpitch-init.ly to use drum pitches. This file defines the pitches from the Scheme variable drum-pitch-names, the definition of which can be read in scm/drums.scm. Each piece of percussion has a full name and an abbreviated name, and either the full name or the abbreviation may be used in input files.

To typeset the music on a staff apply the function drums->paper to the percussion music. This function takes a list of percussion instrument names, notehead scripts and staff positions (that is: pitches relative to the C-clef) and transforms the input music by moving the pitch, changing the notehead and (optionally) adding a script:

     \include "drumpitch-init.ly"
     up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
     down = \notes { bassdrum4 snare8 bd r bd sn4 }
     \score {
         \apply #(drums->paper 'drums) \context Staff <<
             \clef percussion
             \new Voice { \voiceOne \up }
             \new Voice { \voiceTwo \down }
         >>
     }
     
     

[picture of music]

In the above example the music was transformed using the list 'drums. The following lists are defined in scm/drums.scm:
'drums
to typeset a typical drum kit on a five-line staff:

[picture of music]

The drum scheme supports six different toms. When there fewer toms, simply select the toms that produce the desired result, i.e. to get toms on the three middle lines you use tommh, tomml and tomfh.

Because general MIDI does not contain rimshots the sidestick is used for this purpose instead.

'timbales
to typeset timbales on a two line staff:

[picture of music]


'congas
to typeset congas on a two line staff:

[picture of music]


'bongos
to typeset bongos on a two line staff:

[picture of music]


'percussion
to typeset all kinds of simple percussion on one line staves:

[picture of music]

If you do not like any of the predefined lists you can define your own list at the top of your file:

     #(set-drum-kit 'mydrums `(
             (bassdrum     default   #f        ,(ly:make-pitch -1 2 0))
             (snare        default   #f        ,(ly:make-pitch 0 1 0))
             (hihat        cross     #f        ,(ly:make-pitch 0 5 0))
             (pedalhihat   xcircle   "stopped" ,(ly:make-pitch 0 5 0))
             (lowtom	      diamond   #f        ,(ly:make-pitch -1 6 0))
     ))
     \include "drumpitch-init.ly"
     up = \notes { hh8 hh hh hh hhp4 hhp }
     down = \notes { bd4 sn bd toml8 toml }
     \score {
         \apply #(drums->paper 'mydrums) \context Staff <<
             \clef percussion
             \new Voice { \voiceOne \up }
             \new Voice { \voiceTwo \down }
         >>
     }
     

[picture of music]

To use a modified existing list, one can prepend modifications to the the existing list:

     #(set-drum-kit 'mydrums (append `(
        (bassdrum default #f ,(ly:make-pitch -1 2 0))
        (lowtom   diamond #f ,(ly:make-pitch -1 6 0))
     ) (get-drum-kit 'drums)))
     

You can easily combine percussion notation with pitched notation. Indeed, the file drumpitch-init.ly replaces the normal pitch names, so you will have to reinclude nederlands.ly after the drum-pattern-definitions to enter normal notes:

     \include "drumpitch-init.ly"
     up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
     down = \notes { bassdrum4 snare8 bd r bd sn4 }
     \include "nederlands.ly"
     bass = \notes \transpose c c,, { a4. e8 r e g e }
     \score {
         <<
             \apply #(drums->paper 'drums) \new Staff <<
                 \clef percussion
                 \new Voice { \voiceOne \up }
                 \new Voice { \voiceTwo \down }
             >>
             \new Staff { \clef "F_8" \bass }
         >>
     }
     

[picture of music]


This page is for LilyPond-2.0.1 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.