lilypond-user
[Top][All Lists]
Advanced

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

Multi-stave TextSpanner line


From: Nick Payne
Subject: Multi-stave TextSpanner line
Date: Sun, 4 Jan 2009 18:47:54 +1100

I have a TextSpanner where I draw a small vertical line at the end of the
TextSpanner line. Where the line continues for more than one stave, The
small vertical line is being drawn at the end of each stave. I'd prefer that
it only get drawn where the spanner line actually ends. Can this be done? I
haven't found the command to achieve it. This is the music function as I
have it at the moment. I have a very similar function for showing barres
(only difference being that the line is solid), and I have the same problem
there.

I suppose I could really condense it to one function by having dash-fraction
as another parameter and setting it to 1 for a solid line...

harmonics = #(define-music-function (parser location text shorten adjBreak
adjEnd) (string? pair? number? number?) #{
        \once \override TextSpanner #'bound-details #'left #'text = $text
        \once \override TextSpanner #'bound-details #'left
#'stencil-align-dir-y = #CENTER
        \once \override TextSpanner #'bound-details #'left #'padding = #(car
$shorten)
        \once \override TextSpanner #'bound-details #'right #'padding =
#(cdr $shorten)
        \once \override TextSpanner #'bound-details #'right #'text = \markup
{ \draw-line #'(0 . -0.5) }
        \once \override TextSpanner #'dash-period = #1.5
        \once \override TextSpanner #'dash-fraction = #0.6
        \once \override TextSpanner #'bound-details #'left-broken #'X =
#$adjBreak
        \once \override TextSpanner #'bound-details #'right-broken #'padding
= #$adjEnd
#})

Nick Payne





reply via email to

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