Am Sa., 25. Jan. 2020 um 19:40 Uhr schrieb David Stephen Grant <da...@davidgrant.no>: > > I'm trying to create a custom flag stencil, and would like to get the current > _beam_ thickness. As a first step, in the following example I would expect > 0.5, then 1, to be printed to the console. Is there a way of doing this? > > Thanks, > David > > \version "2.19.83" > #(define (my-flag) > (lambda (grob) > (format #t "~a" > ;;; GET THE CURRENT BEAM-THICKNESS > ) > empty-stencil)) > { > \override Flag.stencil = #(my-flag) > \override Beam.beam-thickness = #0.5 > c'8 r8 > \override Beam.beam-thickness = #1.0 > c'8 r8 > }
Hi, your example prints no Beams, actually no Beam-grob is created. Thus any override for Beam will not find the grob to apply, in consequence you can't read the grob-properties of a non-existing grob from a different grob. May I ask how your Flag will look? We have some code implemented in the source which may help... Cheers, Harm