Hi-

I am trying to notate a harp string muffle like here:
https://s3.amazonaws.com/cdn.harpcenter.com/images/extras/MufflesEx10R10.jpg

I found a script by Peter Bjuhr that successfully replaces the stem
(modified for glyph I need):
https://lists.gnu.org/archive/html/lilypond-user/2014-02/msg00665.html

#(define (muffle-stem grob)
    (if (ly:stencil? (ly:stem::print grob))
      (let* ((stencil (ly:stem::print grob))
             (X-ext (ly:stencil-extent stencil X))
             (Y-ext (ly:stencil-extent stencil Y))
             (width (interval-length X-ext))
             (len (interval-length Y-ext)))

        (ly:stencil-translate
          (grob-interpret-markup grob
            (markup #:smuflglyph "stemDamp"))
          (cons 0 (interval-start Y-ext))))
      #f))

My only problem is that the Smufl glyph doesn't flip vertically with the
stem, so it doesn't look right on down-stems. Can anyone help enhance the
script to account for stem direction?

Thanks so much-

Jon Arnold
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to