lilypond-user
[Top][All Lists]
Advanced

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

Re: programming error for thickness/control-points of Slur


From: Thomas Morley
Subject: Re: programming error for thickness/control-points of Slur
Date: Fri, 27 May 2022 11:58:01 +0200

Am Fr., 27. Mai 2022 um 11:22 Uhr schrieb Thomas Morley
<thomasmorley65@gmail.com>:
>
> Hi,
>
> lsr-snippet "Variable bow thickness depending on length"
> https://lsr.di.unimi.it/LSR/Item?u=1&id=1028 looks at 'control-points
> to calculate a modified thickness.
>
> For recent lily-versions this throws
> programming error: cyclic dependency: calculation-in-progress
> encountered for Slur.thickness
> as soon as 'control-points are called in a thickness-override.
>
> Stripped down example:
>
> \version "2.23.9"
>
> {
>   \override Slur.thickness =
>   #(lambda (grob)
>     ;; all of below trigger the programming error
>     (ly:slur::calc-control-points grob)
>     ;(ly:grob-property grob 'control-points)
>     ;((assoc-get 'control-points (ly:grob-basic-properties grob)) grob)
>     2)
>
>   b1( b')
> }
>
> I think I can make it work with an override for 'after-line-breaking
> (calling 'control-points, set 'thickness to the result of calculations
> based on the 'control-points and finally redo setting
> 'control-points).
>
> Is there a better way?
>
> Thanks,
>   Harm

Btw, the snippet-description says " bow length is estimated by
calculating the linear distance between its endpoints".
Is it worth the effort to calculate the real bow-length?

Thanks,
  Harm



reply via email to

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