lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forcing a specific notehead glyph


From: luis jure
Subject: Re: forcing a specific notehead glyph
Date: Mon, 1 Apr 2013 06:32:12 -0300

on 2013-04-01 at 08:20 Marc Hohl wrote:

> the rest of the function remains unaffected.

ok, now i see. for the benefit of the archives, i confirm that the full
example below works to perfection with lilypond-2.17.15. no errors, and
the output is exactly what i wanted. 

thank you all!


lj


\version "2.17.15"

alwaysPrintWholeLaThinBassDrum =
\override NoteHead #'duration-log =
  #(lambda (grob)
     (let* ((style (ly:grob-property grob 'style))
            (grob-probs (ly:grob-properties grob))
            (cause (assoc-get 'cause grob-probs))
            (drum-type (ly:prob-property cause 'drum-type)))

     (if (and (eq? style 'laThin) (eq? drum-type 'bassdrum))
         0
         (note-head::calc-duration-log grob))))

#(define mydrums 
  '(
    (bassdrum  laThin #f -1)
    (hihat     laThin #f  1)
   ))

\new DrumStaff 
  \with {
    \override StaffSymbol #'line-count = #2
    drumStyleTable = #(alist->hash-table mydrums)
    \alwaysPrintWholeLaThinBassDrum
  }

\drummode { bd8 bd bd4 bd2 | hh8 hh hh4 hh2 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]