lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text Spanner auto expand to end of duration


From: Dimitris Marinakis
Subject: Text Spanner auto expand to end of duration
Date: Thu, 12 Nov 2020 15:36:03 +0200

Can this be adapted to work with Text Spanners? Does anyone have any similar workarounds?
I just need to automatically extend TextSpanners to the end of the duration without too many manual guesstimations. 

 #(define (encompass-duration grob)
   (let* ((rb (ly:spanner-bound grob RIGHT))
          (sys (ly:grob-system grob))
          (cols (ly:grob-array->list (ly:grob-object sys 'columns)))
          (me-forward (memq rb cols)))
     (if (and me-forward (> (length me-forward) 1))
         (ly:spanner-set-bound! grob RIGHT (cadr me-forward)))
     (ly:piano-pedal-bracket::print grob)))

{
  \override Staff.PianoPedalBracket.stencil = #encompass-duration
 % \override Staff.PianoPedalBracket.shorten-pair = #'(0 . 0.5)
  \set Staff.pedalSustainStyle = #'bracket
  c'4\sustainOn c' c' c'\sustainOff
  c'4 c'\sustainOn c'\sustainOff c'
  c'4\sustainOn c' c' c'
  \break
  c'4\sustainOff c' c' c'
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]