Jump to content

High and low woodblock example: Difference between revisions

From LilyPond wiki
m Lemzwerg moved page High and Low woodblock example to High and low woodblock example without leaving a redirect: Only the first letter of a title should be uppercase
mNo edit summary
 
Line 1: Line 1:
Two Woodblocks, entered with 'wbh' (high woodblock) and 'wbl' (low woodblock). The length of the barline has been altered with an \override command otherwise it would be too short. The positions of the two stafflines also have to be explicitly defined.
Two Woodblocks, entered with ‘wbh’ (high woodblock) and ‘wbl’ (low woodblock). The length of the bar line has been altered with an <code>\override</code> command, otherwise it would be too short. The positions of the two staff lines also have to be explicitly defined.
 
<lilypond version="2.24" full>
\paper { tagline = ##f }


<lilypond version="2.24">
% These lines define the position of the woodblocks in the stave;
% 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
% if you like, you can change it or you can use special note heads
Line 30: Line 28:
   \drummode {
   \drummode {
     \time 2/4
     \time 2/4
     wbl8 16 16 8-> 8 |
     wbh8 16 16 8-> 8 |
     wbl8 16 16-> ~ 16 16 r8 |
     wbl8 16 16-> ~ 16 16 r8 |
   }
   }
Line 37: Line 35:


[[Category:Percussion]]
[[Category:Percussion]]
[[Category:Preparing parts]]
[[Category:Really simple]]
[[Category:Rhythms]]
[[Category:Rhythms]]
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 11:28, 30 November 2025

Two Woodblocks, entered with ‘wbh’ (high woodblock) and ‘wbl’ (low woodblock). The length of the bar line has been altered with an \override command, otherwise it would be too short. The positions of the two staff lines also have to be explicitly defined.

\version "2.24"

% 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.
#(define mydrums '((hiwoodblock default #f  3)
                   (lowoodblock default #f -2)))

woodstaff = {
  % This defines a staff with only two lines.
  % It also defines the positions of the two lines.
  \override Staff.StaffSymbol.line-positions = #'(-2 3)

  % This is necessary; if not entered,
  % the barline would be too short!
  \override Staff.BarLine.bar-extent = #'(-1.0 . 1.5)
  % small correction for the clef:
  \set DrumStaff.clefPosition = 0.5
}

\new DrumStaff {
  % with this you load your new drum style table
  \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)

  \woodstaff

  \drummode {
    \time 2/4
    wbh8 16 16 8-> 8 |
    wbl8 16 16-> ~ 16 16 r8 |
  }
}