Paul,

Thank you very much. Really excellent.

Now that I can make additions to a notehead stencil, I find an issue with the 
stem being offset. What does one do to correct this? The following snippet 
illustrates what I am trying to do, but the stems are offset - naturally.

[I need some small fake slurs for reasons that need not detain us here. We can 
get on to that later!]

Andrew


\version "2.19.18"

#(define (sten)
   (ly:stencil-translate
    (make-connected-path-stencil
     '((0.5 -0.8   1.5 -0.8   2 0))
     0.1 1 1 #f #f)
    (cons 0.5 -1)))

#(define expNoteHeadStencil
   (lambda (grob)
     (let* ((stil (ly:grob-property grob 'stencil))
            (newStil (ly:stencil-add stil (sten))))
       (if (ly:stencil? stil)
           (ly:grob-set-property! grob 'stencil newStil)
           #f
           ))))

\relative c'' {
  c
  \override Staff.NoteHead.before-line-breaking = #expNoteHeadStencil
  g a bes
  \revert Staff.NoteHead.before-line-breaking
  c
}


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

Reply via email to