Hi Urs,
On Fri, Apr 27, 2012 at 6:51 AM, David Nalesnik <[email protected]>wrote:
> Hi Urs,
>
> I've rewritten shape-slur so that you should be able to use lists of
> offsets which don't match with the number of slur fragments. I've tested
> it somewhat, but if you run into a problem, let me know.
>
I noticed that you'll produce an error if you apply a list of lists to a
slur which isn't broken (i.e., if a layout change results in a once-broken
slur appearing on a single line). Here is a fix for that:
#(define ((shape-slur offsets) 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) '() ))
(total-found (length siblings)))
(define (helper sibs offs)
(if (and (eq? (car sibs) grob)
(pair? offs))
((alter-curve (car offs)) grob)
(if (pair? offs)
(helper (cdr sibs) (cdr offs))
((alter-curve '()) grob))))
(if (>= total-found 2)
(helper siblings offsets)
(if (list? (car offsets))
((alter-curve (car offsets)) grob)
((alter-curve offsets) grob)))))
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user