On 2022-02-09 5:15 pm, Simon Albrecht wrote:
Hello list,
if a grob callback queries a grob property on a hairpin as follows,
the hairpin gets printed infinitely short (with a corresponding
warning: crescendo too small):
A pure vs. unpure issue perhaps? If you use ly:grob-pure-property to
access it, it seems to work.
%%%%
\version "2.22.0"
off =
#(define-event-function
(ev) (ly:music?)
(define (offsetter-fn grob)
(format #t "\nY-offset=~s"
(ly:grob-pure-property grob 'Y-offset 0 0 0))
(ly:grob-set-property! grob 'color red))
#{ \tweak before-line-breaking #offsetter-fn $ev #})
{
2\off \< 2\f
2\tweak Y-offset #-0.5 \off \< 2\f
2\offset Y-offset #0.5 \off \< 2\f
}
%%%%
-- Aaron Hill
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond