<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- header_tag --> <html lang="en"> <head> <title>Custom percussion staves - GNU LilyPond Notation Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="GNU LilyPond Notation Reference"> <meta name="generator" content="makeinfo 4.11"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Common-notation-for-percussion.html#Common-notation-for-percussion" title="Common notation for percussion"> <link rel="prev" href="Percussion-staves.html#Percussion-staves" title="Percussion staves"> <link rel="next" href="Ghost-notes.html#Ghost-notes" title="Ghost notes"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1999--2007 by the authors Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections. A copy of the license is included in the section entitled ``GNU Free Documentation License''. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } hr { border:0; height:1; color: #000000; background-color: #000000; } /* hr { border: none; height: 1px; color: #666666; background-color: #666666; } body { border-left: 1px solid #666666; border-right: 1px solid #666666; color: #332d28; margin-right: auto; margin-left: auto; width: 60em; list-style-type: square; font-family: Arial,Helvetica,sans-serif; padding-right: 1em; padding-left: 1em; } a { border-bottom: 1px dashed #344242; text-decoration: none; color: #344242; } a:link { text-decoration: none; } a:visited { border-bottom: 1px dashed #666666; color: #666666; } a:active { border-bottom: 1px solid #00cccc; color: #00cccc; } a:hover { border-bottom: 1px solid #1d7b85; color: #1d7b85; } blockquote { border: 1px solid #cccccc; padding: 3px; width: 40em; } .node { border-left: 1px solid #666666; margin: -0.5em 0px 1em; padding: 2px 1px 0px; font-style: italic; } .node a { border: none; text-decoration: underline; font-style: normal; font-weight: bold; } .verbatim { font-family: "Courier New",Courier,monospace; } .unnumberedsubsubsec { font-size: large; color: #1d7b85; } .subsubheading { font-size: large; color: #3b220d; } .contents { border: 1px dashed #339999; margin: 3px 2em; list-style-type: square; padding-right: 1em; width: 40em; background-color: #fcfff9; } .contents a { border-bottom: 1px dashed #423d34; text-decoration: none; color: #423d34; } .contents a:visited { border-bottom: 1px dashed #666666; color: #666666; } .contents a:active { border-bottom: 1px solid #f0d86d; color: #f0d86d; } .contents a:hover { border-bottom: 1px solid #3b220d; color: #3b220d; } .menu { border-left: 1px dashed #339999; margin: 3px 2em 1em; list-style-type: square; padding-left: 1.4em; width: 40em; } .unnumbered { } h2 { font-size: x-large; color: #1d7b85; } */ --></style> </head> <BODY BGCOLOR=WHITE TEXT=BLACK> <div class="node"> <p> <a name="Custom-percussion-staves"></a> Next: <a rel="next" accesskey="n" href="Ghost-notes.html#Ghost-notes">Ghost notes</a>, Previous: <a rel="previous" accesskey="p" href="Percussion-staves.html#Percussion-staves">Percussion staves</a>, Up: <a rel="up" accesskey="u" href="Common-notation-for-percussion.html#Common-notation-for-percussion">Common notation for percussion</a> <hr> </div> <h5 class="subsubsection">2.5.1.6 Custom percussion staves</h5> <p>If you do not like any of the predefined lists you can define your own list at the top of your file. <blockquote> <pre class="verbatim"> #(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 } >> </pre> <p> <a href="../ce/lily-ee518889.ly"> <img align="middle" border="0" src="../ce/lily-ee518889.png" alt="[image of music]"> </a> </p> </blockquote> <p class="noindent"> <h5 class="subsubheading">Selected Snippets</h5> <p>FIXME: MOVE ALL THESE TO LSR! -gp <p>Here are some examples: <p>Two Woodblocks, entered with wbh (high woodblock) and wbl (low woodblock) <blockquote> <pre class="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 % or You can use special note heads for the woodblocks. woodstaff = { \override Staff.StaffSymbol #'line-positions = #'(-2 3) % this defines a staff with only two lines. It also defines the positions of the two lines \override Staff.BarLine #'bar-size = #3 } %% this is neccessary. If not entered, the barline wuld be too short! \new DrumStaff { \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) %% with this You load Your new drum style table \woodstaff \drummode { \time 2/4 wbl8 wbl16 wbl wbh 8 -> wbl | wbl 8 wbl16 wbh ~ -> wbh wbl 16 r8 | } } </pre> <p> <a href="../4c/lily-c2d206ea.ly"> <img align="middle" border="0" src="../4c/lily-c2d206ea.png" alt="[image of music]"> </a> </p> </blockquote> <p class="noindent"> <h5 class="subsubheading">See also</h5> <p class="indent"> <p>Note that in this special case the length of the barline must altered with <code>\override Staff.BarLine #'bar-size #number</code>. 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 <a href="Staff-symbol.html#Staff-symbol">Staff symbol</a>. <p>A tambourine, entered with "tamb": <blockquote> <pre class="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 % 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 | %% the trick with the scaled duration and the shorter rest is neccessary for the correct ending of the trill-span! } } </pre> <p> <a href="../ab/lily-66c9c5c6.ly"> <img align="middle" border="0" src="../ab/lily-66c9c5c6.png" alt="[image of music]"> </a> </p> </blockquote> <p>Music for Tam-Tam (entered with "tt"): <blockquote> <pre class="verbatim"> #(define mydrums '( (tamtam default #t 0) ) ) tamtamstaff = { \override Staff.StaffSymbol #'line-positions = #'( 0 ) \override Staff.BarLine #'bar-size = #3 \set DrumStaff.instrumentName="Tamtam"} \new DrumStaff { \tamtamstaff \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drummode { tt 1 \pp \laissezVibrer } } </pre> <p> <a href="../cd/lily-92f31584.ly"> <img align="middle" border="0" src="../cd/lily-92f31584.png" alt="[image of music]"> </a> </p> </blockquote> <p>Two different bells, entered with "cb" (cowbell) and "rb" (ridebell)" <blockquote> <pre class="verbatim"> %% bells are enterd with: % "cb" (cowbell) and "rb" (ridebell)" #(define mydrums '( (ridebell default #t 3 ) (cowbell default #t -2))) bellstaff = { \override DrumStaff.StaffSymbol #'line-positions = #'(-2 3) \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \override Staff.BarLine #'bar-size = #3 \set DrumStaff.instrumentName="Different Bells"} \new DrumStaff { \bellstaff \drummode { \time 2/4 \repeat "unfold" 2 { rb 8 rb cb cb16 rb ~ -> | rb16 rb 8 rb 16 cb 8 cb | } } } </pre> <p> <a href="../57/lily-58a92218.ly"> <img align="middle" border="0" src="../57/lily-58a92218.png" alt="[image of music]"> </a> </p> </blockquote> <p>Here an short example by maestro Stravinsky (from "L'hostire du Soldat") <blockquote> <pre class="verbatim"> #(define mydrums '( (bassdrum default #t 4 ) (snare default #t -4 ) (tambourine default #t 0) ) ) global = { \time 3/8 s 4. \time 2/4 s 2 *2 \time 3/8 s 4. \time 2/4 s 2 } drumsA = { \context DrumVoice << { \global } {\drummode { \autoBeamOff \stemDown sn 8 \stemUp tamb s8 | sn4 \stemDown sn4 | \stemUp tamb 8 \stemDown sn8 \stemUp sn16 \stemDown sn \stemUp sn8 | \stemDown sn 8 \stemUp tamb s8 | \stemUp sn4 s8 \stemUp tamb | } } >> } drumsB = { \drummode { s 4 bd 8 s 2*2 s 4 bd8 s 4 bd8 s 8 } } \layout { indent = #40 } \score { \new StaffGroup << \new DrumStaff { \set DrumStaff.instrumentName= \markup { \column { "Tambourine" "et" "caisse claire s. timbre" } } \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drumsA } \new DrumStaff { \set DrumStaff.instrumentName= "Grosse Caisse" \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums) \drumsB } >> } </pre> <p> <a href="../2c/lily-7f299dfb.ly"> <img align="middle" border="0" src="../2c/lily-7f299dfb.png" alt="[image of music]"> </a> </p> </blockquote> <p class="noindent"> <h5 class="subsubheading">See also</h5> <p class="indent"> <p>Snippets: <a href="../../../input/lsr/lilypond-snippets/Percussion.html#Percussion">Percussion</a>. <p>Internals Reference: <a name="index-DrumStaff-2112"></a><a href="../lilypond-internals/DrumStaff.html#DrumStaff">DrumStaff</a>, <a name="index-DrumVoice-2113"></a><a href="../lilypond-internals/DrumVoice.html#DrumVoice">DrumVoice</a>. <!-- TODO: check name -gp --> <!-- footer_tag --><br><hr> <div class="node"> <p> Next: <a rel="next" accesskey="n" href="Ghost-notes.html#Ghost-notes">Ghost notes</a>, Previous: <a rel="previous" accesskey="p" href="Percussion-staves.html#Percussion-staves">Percussion staves</a>, Up: <a rel="up" accesskey="u" href="Common-notation-for-percussion.html#Common-notation-for-percussion">Common notation for percussion</a> </div> <div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;"> <p> <font size="-1"> This page is for LilyPond-2.11.57 (development-branch). <br> <address> Report errors to <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a>. </address> <br> Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome. </font> </p> </div> </BODY></html>