|
From: | Thomas Morley |
Subject: | Re: forcing a specific notehead glyph |
Date: | Sun, 31 Mar 2013 03:04:14 +0200 |
hello list,
i created a custom drum staff, where the bass drum uses the laThin note
head (simplified example, not my actual staff):
\version "2.17.14"
#(define mydrums '(
(bassdrum laThin #f -1)
))
\new DrumStaff \with {
\override StaffSymbol #'line-count = #2
drumStyleTable = #(alist->hash-table mydrums)
}
\drummode { bd8 bd bd2. }
now, lilypond chooses a black or white note head (s0, s1 or s2) depending
on the note duration. but i want to force the use of a white note head
(noteheads.s0laThin) for all notes, independently of their duration. is it
possible to do that in the definition of the drumstaff?
i came up with a funtion:
mbd =
#(define-music-function
(parser location dur)
(ly:duration?)
#{
\drummode {
\tweak NoteHead.stencil #ly:text-interface::print
\tweak NoteHead.text
\markup \musicglyph #"noteheads.s0laThin"
bd$dur }
#})
then this works:
\drummode { \mbd8. \mbd16 r16 \mbd8. }
but i don't know if it is well written. is there an easier/better way? any
way that i could do that in the drumstaff definition?
best,
lj
[Prev in Thread] | Current Thread | [Next in Thread] |