]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/adding-drum-parts.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / adding-drum-parts.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.19.56
8 \version "2.19.56"
9
10 \header {
11   lsrtags = "percussion, preparing-parts, really-simple, rhythms, specific-notation"
12
13   texidoc = "
14 Using the powerful pre-configured tools such as the @code{\\drummode}
15 function and the @code{DrumStaff} context, inputting drum parts is
16 quite easy: drums are placed at their own staff positions (with a
17 special clef symbol) and have note heads according to the drum.
18 Attaching an extra symbol to the drum or restricting the number of
19 lines is possible.
20
21 "
22   doctitle = "Adding drum parts"
23 } % begin verbatim
24
25 drh = \drummode {
26         cymc4.^"crash" hhc16^"h.h." hh hhc8 hho hhc8 hh16 hh
27         hhc4 r4 r2
28       } % begin verbatim
29
30 drl = \drummode {
31         bd4 sn8 bd bd4 << bd ss >>
32         bd8 tommh tommh bd toml toml bd tomfh16 tomfh
33       }
34 timb = \drummode {
35          timh4 ssh timl8 ssh r timh r4
36          ssh8 timl r4 cb8 cb
37        }
38
39 \score {
40   <<
41     \new DrumStaff \with {
42       instrumentName = #"timbales"
43       drumStyleTable = #timbales-style
44       \override StaffSymbol.line-count = #2
45       \override BarLine.bar-extent = #'(-1 . 1)
46     }
47     <<
48       \timb
49     >>
50     \new DrumStaff \with { instrumentName = #"drums" }
51     <<
52       \new DrumVoice { \stemUp \drh }
53       \new DrumVoice { \stemDown \drl }
54     >>
55   >>
56   \layout { }
57   \midi { \tempo 4 = 120 }
58 }