lilypond-user
[Top][All Lists]
Advanced

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

Re: Slur position : "catching" Llilypond values...


From: David Nalesnik
Subject: Re: Slur position : "catching" Llilypond values...
Date: Fri, 11 Feb 2011 16:25:30 -0600

On 2/11/11, Xavier Scheuer <address@hidden> wrote:
> On 8 February 2011 22:56, David Nalesnik <address@hidden> wrote:
>>
>> Hello,
>>
>> There probably is a better way to do this, but the function below
>> seems to do the trick.  It adds an offset to the Y-coordinate of
>> either or both of the slur's attachment points.  Setting one value of
>> the pair to zero will leave one end-point as it is.  (See attached
>> files.)
>>
>> offsetPositions =
>>  #(define-music-function (parser location offsets) (pair?)
>>    #{
>>       \once \override Slur #'positions = #(lambda (grob)
>>         `(,(+ (car $offsets) (cdar (ly:slur::calc-control-points grob))) .
>>           ,(+ (cdr $offsets) (cdr (cadddr (ly:slur::calc-control-points
>> grob))))))
>>    #})
>
> Nice feature!

Thanks!

> Could you add it to the LSR?  http://lsr.dsi.unimi.it/

Done: http://lsr.dsi.unimi.it/LSR/Snippet?id=748

I tried to make the code a little clearer by using "first" and "last,"
but apparently those procedures aren't defined within the #{  . . . #}
construct.

> Cheers,
> Xavier

Best,
David



reply via email to

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