lilypond-user
[Top][All Lists]
Advanced

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

Re: DynamicTextSpanner spacing


From: Aaron Hill
Subject: Re: DynamicTextSpanner spacing
Date: Sat, 05 Mar 2022 16:35:18 -0800

On 2022-03-05 3:49 pm, Erika Pirnes wrote:
I would like the dotted line of the crescendo to start a bit later and
end a bit earlier. It is too close to "cresc.", in my opinion at
least. And sometimes too close to the "f" as well. (A tiny detail, for
sure, but it looks annoying.) Any ideas?
[...]
music = \relative c' {
  \repeat unfold 5{c8 \p \cresc d e f g a b4 c8 \f b c2.}
}

You will need to play around with the bound-details for the DynamicTextSpanner:

%%%%
\version "2.18.2"

\relative c' {
  %% The space before the left side of the spanner.
  %% (NOTE: This includes the attached stencil.)
  %% Default is 0.75; we are adding two units of space.
  \override DynamicTextSpanner.bound-details.left.padding = #2.75

  %% Since we want the space between the stencil and
  %% line, we need to shift the stencil over a bit.
  %% Default is (-0.75 . -0.5); we move it left by the
  %% same increment we applied to the padding above.
  \override DynamicTextSpanner.bound-details
    .left.stencil-offset = #'(-2.75 . -0.5)

  %% The space after the right side of the spanner.
  %% Default is 0.75; we are adding two units of space.
  \override DynamicTextSpanner.bound-details.right.padding = #2.75

  %% (For debugging only...)
  %% Highlight the grob in red for better visibility.
  %% Also make the line solid to show its extents clearly.
  \override DynamicTextSpanner.color = #red
  \override DynamicTextSpanner.dash-fraction = #1

  \repeat unfold 5{ c8 \p \cresc d e f g a b4 c8 \f b c2. }
}
%%%%


-- Aaron Hill



reply via email to

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