[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Odd interaction between ly:grob-property and hairpin
From: |
Simon Albrecht |
Subject: |
Odd interaction between ly:grob-property and hairpin |
Date: |
Thu, 10 Feb 2022 02:15:40 +0100 |
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