]> git.donarmstrong.com Git - lilypond.git/blob - input/test/drums.ly
93a0a9e70064f6a4255b6aa6ba63710ebebc7397
[lilypond.git] / input / test / drums.ly
1 % tests drum notation and midi-drums.
2 % see ly/drumpitch.ly for list of instruments and paper-kits.
3 %     scm/midi.scm for list of midi-drumkits.
4
5 \include "drumpitch-init.ly"
6
7 \version "1.3.146"
8
9 drh = \notes { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
10 drl = \notes {\repeat "unfold" 3 {bd4 sn8 bd bd4 <bd ss>} bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
11 timb = \notes \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb}
12
13 \score { \repeat "volta" 2
14  <
15   \context TwoLineStaff=timbst \notes <
16     \property Staff.instrument="timbales"
17     \clef "percussion"
18     \apply #(drums->paper 'timbales) \timb
19   >
20   \context Staff=drumst \notes <
21     \property Staff.instrument="drums"
22     \clef "percussion"
23     \apply #(drums->paper 'drums) <
24       \context Voice=voa {\stemUp \drh }
25       \context Voice=vob {\stemDown \drl }
26     >
27   >
28  >
29  \paper {
30    \translator {
31       \StaffContext
32       \consists Instrument_name_engraver
33       Script \override #'padding = #0.5
34    }
35    \translator {
36       \StaffContext
37       \name TwoLineStaff
38       \alias Staff
39       \consists Instrument_name_engraver
40       StaffSymbol \override #'line-count = #2
41       BarLine \override #'bar-size = #2
42    }
43    \translator {
44       \ScoreContext
45       \accepts TwoLineStaff
46    }
47  }
48 }
49
50 \score { \repeat "unfold" 2
51   \context Staff \notes <
52     \property Staff.instrument="drums"
53     \timb
54     \drh
55     \drl
56   >
57   \midi{ \tempo 4=120 }
58 }
59