lilypond-user
[Top][All Lists]
Advanced

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

Re: remove accidental from a chord?


From: Jonathan Kulp
Subject: Re: remove accidental from a chord?
Date: Mon, 15 Jun 2009 15:27:06 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Mark Polesky wrote:
How do I properly remove one accidental from a chord? I found I
was able to replace the stencil with an empty-stencil, but there's
still a space left where it would have been.

I see that accidental-placement-interface has an internal property called accidental-grobs, but I don't know how to access it, or if
I could even change it from scheme if I wanted to.

Here's an example of what I was doing. Any help is appreciated.
- Mark

#(define (remove-middle-line-accidental grob)
   ;; Accidental stencil callback
   (if (eq? (ly:grob-property (ly:grob-property grob 'cause)
                              'staff-position) 0)
       empty-stencil
       (ly:accidental-interface::print grob)))

\relative {
  \once \override Accidental #'stencil =
    #remove-middle-line-accidental
  <ef gf bf df>
}


The crude method would be to put the wrong pitch (i.e. use "b" instead of "bf"), which would take care of the spacing problems, but of course if you need correct MIDI output then this would jack it up. I thought there might be a way to use the \tweak command for this, but after 15 minutes I can't find it.

Jon
--
Jonathan Kulp
http://www.jonathankulp.com




reply via email to

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