Hi all, I tried to improve the code from https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00265.html but all my attempts resulted in inconsistent behaviour.
Thus I wrote some test-code, see bottom. Obviously the beam is shortened while applying 'gap, though as soon as 'gap exceeds 2.0 a certain value is added and further increasing 'gap by multiples of 0.1 leads to additions of 0.2 !? Excerpt from terminal: Applied gap: 1.7, shortens the Beam by: 1.7 Applied gap: 1.8, shortens the Beam by: 1.8 Applied gap: 1.9, shortens the Beam by: 1.9 Applied gap: 2.0, shortens the Beam by: 2.0 Applied gap: 2.1, shortens the Beam by: 2.107998 Applied gap: 2.2, shortens the Beam by: 2.307998 Applied gap: 2.3, shortens the Beam by: 2.507998 Applied gap: 2.4, shortens the Beam by: 2.707998 I have no clue why this happens and where those added values came from. Any insights? Thanks, Harm Here the test-code (printed output of 5 pages is not interesting, look at terminal-messages) \version "2.20.0" \paper { ragged-right = ##f indent = 0 } #(define (tst gap) #{ \override Beam.after-line-breaking = #(lambda (grob) (let* ((sys (ly:grob-system grob)) (bound-left (ly:spanner-bound grob LEFT)) (bound-right (ly:spanner-bound grob RIGHT)) (left-nc (ly:grob-parent bound-left X)) (right-nc (ly:grob-parent bound-right X)) (left-nc-ext (ly:grob-extent left-nc sys X)) (right-nc-ext (ly:grob-extent right-nc sys X)) (max-beam-length (- (car right-nc-ext) (cdr left-nc-ext))) (x-pos (ly:grob-property grob 'X-positions)) (beam-length (interval-length x-pos))) (format #t "\nApplied gap: ~a, shortens the Beam by: ~a" gap (- max-beam-length beam-length)))) \override Beam.gap = $gap \repeat tremolo #8 { a'16 a' } #}) $@(map (lambda (gap) (tst gap)) (iota 61 0 0.1))