lilypond-user
[Top][All Lists]
Advanced

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

Text spanner padding


From: Andrew Bernard
Subject: Text spanner padding
Date: Fri, 22 Feb 2019 18:35:58 +1100

I am attempting to use a text spanner as an indicator for a repeated section. I need it to stop at the barline, and not on the next note. Shortening it by using padding on the right affects the first line as well, which is not wanted. How does one do this properly?

And my usual question, is there a proper way to do this rather than trying to bend a text spanner into it?

Sometimes I may want 17x or 5x, etc, not just twice, or 3x. And I want the dashed line effect.

Andrew

%====
\version "2.19.82"

leftBracketPath =
#'((moveto 0 -1)
   (lineto 0 0)
   (lineto 2 0)
   )

rightBracketPath =
#'((lineto 2 0)
   (lineto 2 -1)
   )

treble = {
  \time 2/4

  \once \override TextSpanner.dash-period = #1
  \once \override TextSpanner.bound-details.left.text =
  \markup {
    \path #0.25 #leftBracketPath \general-align #Y #CENTER \sans \upright " x3"
  }
  \once \override TextSpanner.bound-details.right.text =
  \markup {
    \general-align #Y #CENTER \sans \upright " x3" \path #0.25 #rightBracketPath
  }
  \once \override TextSpanner.bound-details.left-broken.text = ##f
  \once \override TextSpanner.bound-details.right-broken.text = ##f
  \override TextSpanner.bound-details.right.padding = #11

  f'''1\startTextSpan f''' f'''
  \break
  f'''
  \bar "."
  f'''\stopTextSpan
  \bar "||"
}

\score {
  \new Staff { \treble }
  \layout {}
}

%====


reply via email to

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