Hi Nick,
I also played around with trying to make a callback function for \override
> LaissezVibrerTie #'control-points, but although Lilypond gives no error on
> the console, the LV tie doesn't appear at all when I try to use the
> callback.
>
>
The following should work. (I've also substituted in a more current
version of the snippet you incorporated. Same result, but I think it looks
a little better.)
\version "2.15.30"
#(define ((alter-lv-tie-curve offsets) grob)
(let ((coords (ly:semi-tie::calc-control-points grob)))
(define (add-offsets coords offsets)
(if (null? coords)
'()
(cons
(cons (+ (caar coords) (car offsets))
(+ (cdar coords) (cadr offsets)))
(add-offsets (cdr coords) (cddr offsets)))))
(add-offsets coords offsets)))
shapeLVTie = #(define-music-function (parser location offsets) (list?)
#{
\once \override LaissezVibrerTie #'control-points = #(alter-lv-tie-curve
offsets)
#})
\relative c' {
d8( e) ~ e4 ~ \shapeLVTie #'(0 0 0.75 -0.7 2.25 -0.7 3 0)
e2\laissezVibrer
}
\relative c' {
\override LaissezVibrerTie #'control-points = #(lambda (grob)
(if (= UP (ly:grob-property grob 'direction))
((alter-lv-tie-curve '(0 0 0.75 0.7 2.25 0.7 3 0)) grob)
((alter-lv-tie-curve '(0 0 0.75 -0.7 2.25 -0.7 3 0)) grob)))
d8( e) ~ e4 ~ e2\laissezVibrer
}
HTH,
David
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user