On 7/4/2019 5:50 PM, Aaron Hill wrote:
On 2019-07-04 2:02 pm, Ben wrote:
This is the first time I've encountered the need to hide /grace note/
beams and/or stems. Can someone show me what I am doing wrong?
Here's my attempt, though it may not be the most ideal:
%%%%
\version "2.19.82"
\language "english"
overlaySlash = #(define-music-function
(thickness length angle offset)
(number? number? number? number-pair?)
#{ \once \override Beam.stencil =
#(grob-transformer 'stencil (lambda (grob orig)
(let ((th (* (ly:staff-symbol-line-thickness grob) thickness))
(x (interval-start (ly:stencil-extent orig X)))
(y (interval-start (ly:stencil-extent orig Y)))
(hl (/ length 2)))
(ly:stencil-add orig
(ly:stencil-translate
(ly:stencil-rotate
(make-line-stencil th (- hl) 0 hl 0)
angle 0 0)
(cons (+ x (car offset)) (+ y (cdr offset)))))))) #})
noStem = \omit Stem
\relative c' {
\overlaySlash 1.2 7 35 #'(2 . -1)
\appoggiatura {
e!8^[ \noStem g! c! fs bf ef
bf fs c! \undo \noStem e,!]
}
\noStem df4
}
%%%%
-- Aaron Hill
Aaron,
This code works perfectly. Why do you say it's not ideal? It looks spot
on. Thank you!
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user