[Top][All Lists]

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

Re: Grace note beams won't hide correctly

From: Ben
Subject: Re: Grace note beams won't hide correctly
Date: Thu, 4 Jul 2019 18:10:01 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

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
              (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


This code works perfectly. Why do you say it's not ideal? It looks spot on. Thank you!

reply via email to

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