lilypond-user
[Top][All Lists]
Advanced

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

Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break


From: Kieren MacMillan
Subject: Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
Date: Sat, 30 May 2009 22:41:51 -0400

The saga continues...  =)

I've hacked the Tie callback to try to adjust the Accidental property. Coloring the Accidental works fine:

%%%%%%%%%%%%%
\version "2.12.2"

#(define (tie-callback tiegrob)
  (let* (
    ; have we been split?
    (orig (ly:grob-original tiegrob))

    ; if yes, get the split pieces (our siblings)
    (siblings (if (ly:grob? orig)
        (ly:spanner-broken-into orig) '() )))

      (if (and (>= (length siblings) 2)
        (eq? (car (last-pair siblings)) tiegrob))
(ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'color red))))

testMusic = \relative
{
  \override Tie #'after-line-breaking = #tie-callback
  cis'2 cis! ~ \break
  cis
}

\score { \testMusic }
%%%%%%%%%%%%%

But when I try

(ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'break-visibility #(#f #f #f))

nothing happens. Am I even close to on the right track?

Thanks,
Kieren.




reply via email to

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