Hi David,
thank you for now. I'll look into it.
But isn't it very likely that I have to reshape a slur anyway when it
changes from broken to unbroken?
In that case I'd even say the errors are a 'feature' so you notice it ...
Provided it is documented enough not to drive you crazy ...
Best
Urs
Am 27.04.2012 15:22, schrieb David Nalesnik:
Hi Urs,
On Fri, Apr 27, 2012 at 6:51 AM, David Nalesnik
<david.nales...@gmail.com <mailto:david.nales...@gmail.com>> 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
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user