Percussion staves - GNU LilyPond
Description: GNU LilyPond

Previous: Entering percussion, Up: Rhythmic music

#### 7.4.3 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.

To typeset the music, the notes must be interpreted in a DrumStaff and DrumVoice contexts

>          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 }
>            >>

The above example shows verbose polyphonic notation. The short polyphonic notation, described in Polyphony, can also be used if the DrumVoices are instantiated by hand first. For example,

>          \new DrumStaff <<
>            \new DrumVoice = "1" { s1 *2 }
>            \new DrumVoice = "2" { s1 *2 }
>            \drummode {
>              bd4 sn4 bd4 sn4
>              <<
>                { \repeat unfold 16 hh16 }
>                \\
>                { bd4 sn4 bd4 sn4 }
>              >>
>            }
>          >>

There are also other layout possibilities. To use these, set the property `drumStyleTable` in context DrumVoice. The following variables have been predefined

`drums-style`
  This is the default. It typesets a typical drum kit on a five-line staff

  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 `tommh`, `tomml`, and `tomfh`.

`timbales-style`
  This typesets timbales on a two line staff

`congas-style`
  This typesets congas on a two line staff

`bongos-style`
  This typesets bongos on a two line staff

`percussion-style`
  To typeset all kinds of simple percussion on one line staves.

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

>          #(define mydrums '(
>                   (bassdrum     default   #f         -1)
>                   (snare        default   #f         0)
>                   (hihat        cross     #f         1)
>                   (pedalhihat   xcircle   "stopped"  2)
>                   (lowtom       diamond   #f         3)))
>          up = \drummode { hh8 hh hh hh hhp4 hhp }
>          down = \drummode { bd4 sn bd toml8 toml }

>          \new DrumStaff <<
>            \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
>            \new DrumVoice { \voiceOne \up }
>            \new DrumVoice { \voiceTwo \down }
>          >>

##### See also

Init files: `ly/drumpitch-init.ly`.

Program reference: DrumStaff, DrumVoice.

##### Bugs

Because general MIDI does not contain rim shots, the sidestick is used for this purpose instead.

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

Other languages: English.
Using automatic language selection.