bug-lilypond
[Top][All Lists]
Advanced

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

Re: \omit dynamic occupies space


From: Graham King
Subject: Re: \omit dynamic occupies space
Date: Wed, 27 Apr 2016 14:09:17 +0100

meanwhile, Harm has kindly shown me a work-round.  It is in the first
two bars of this example, which also serves to illustrate the partial
effect of \omit.


        \version "2.19.40"
        
        resetBounds =
          \temporary \override Hairpin.after-line-breaking =
           #(lambda (grob)
             (let ((bound-left (ly:spanner-bound grob LEFT))
                   (bound-right (ly:spanner-bound grob RIGHT)))
               (if (eq? (grob::name bound-left) 'DynamicText)
                   (ly:spanner-set-bound! grob LEFT
                     (ly:grob-parent bound-left X)))
               (if (eq? (grob::name bound-right) 'DynamicText)
                   (ly:spanner-set-bound! grob RIGHT
                     (ly:grob-parent bound-right X)))))
           
         
        {
          <>^\markup "Harm-fu :-)"
          \temporary \omit DynamicText
          \resetBounds
          c'2\p\< c'2\f c'2\f\> c'2\p
          %\revert DynamicText.stencil
          %\revert Hairpin.after-line-breaking
          %% or:
          \undo \omit DynamicText
          \undo \resetBounds
          <>^\markup "no dynamics"
          c'2\< 2\! 2\> 2\!
          <>^\markup "with dynamics"
          c'2\p\< 2\f 2\f\> 2\p
          <>^\markup "\omit dynamics"
          c'2-\omit\p\< 2-\omit\f 2-\omit\f\> 2-\omit\p
        }





Attachment: omit_dynamics_occupy_space.png
Description: PNG image


reply via email to

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