[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: programming error for thickness/control-points of Slur
From: |
Jean Abou Samra |
Subject: |
Re: programming error for thickness/control-points of Slur |
Date: |
Fri, 27 May 2022 11:32:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
Le 27/05/2022 à 11:22, Thomas Morley a écrit :
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?
Yes, quite logical since the control points depend on the
thickness. No, short of refactoring the C++ code, I don't
see a better way than what you described.
Best,
Jean
Re: programming error for thickness/control-points of Slur, Thomas Morley, 2022/05/27