lilypond-user
[Top][All Lists]
Advanced

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

changing grob properties?


From: Marc Hohl
Subject: changing grob properties?
Date: Wed, 13 May 2009 20:50:19 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

I'm working on the "tie problem" in tablatures, that is, tied notes should become invisible,
or (after a line break) parenthesized. I found

http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Difficult-tweaks#Difficult-tweaks

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

        ; 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)) grob))
    (ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))

\relative c'' {
 \override Tie #'after-line-breaking =
 #my-callback
 c1 ~ \break c2 ~ c
}


and wanted to use it as a starting point, but for my problem I have to change the property of another grob, namely NoteHead #'transparent (ok, after a line break there should be parentheses
and I'm working on a Staff, not a TabStaff, but ...) How can I achieve this?
Is this even the right way to solve this task?

Marc




reply via email to

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