Re: Odd interaction between ly:grob-property and hairpin
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
Odd interaction between ly:grob-property and hairpin
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): %% % tested with version 2.22.0 as well -- same bug \version "2.23.6" % guile2 binary from % https://gitlab.com/lilypond/lilypond/-/releases/release%252F2.23.6-1/downloads/lilypond-2.23.6-linux-x86_64.tar.gz off = #(define-event-function (ev) (ly:music?) (let ((offsetter-fn (lambda (grob) (let* ( ; comment/uncomment the following to trigger bug: ; if the grob property is queried, the hairpin gets infinitely short (yoff-prev (ly:grob-property grob 'Y-offset 0)) ) (ly:grob-set-property! grob 'color red) #{ - \tweak before-line-breaking $offsetter-fn - $ev #})) { 2\off \< 2\f } % Best, Simon ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond