lilypond-user
[Top][All Lists]
Advanced

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

Aligning markup (rather than marks) to the left edge?


From: Trevor Bača
Subject: Aligning markup (rather than marks) to the left edge?
Date: Fri, 15 Aug 2014 19:49:58 -0400

Hi,

I'm working on a piece with a lot accelerando and ritardando spanners.

I've built my own accelerando and ritardando spanners using text spanners. Here's a more-or-less stripped down example that works pretty well:

%%% BEGIN %%%

\version "2.19.11"
\language "english"


\new Staff {
    \once \override TextSpanner.arrow-width = 0.25
    \once \override TextSpanner.bound-details.left.text = \markup { 
        \smaller
            \general-align
                #Y
                #DOWN
                \note-by-number
                    #2
                    #0
                    #1
        \upright
            " = 67.5"
        }
    \once \override TextSpanner.bound-details.right.arrow = ##t
    \once \override TextSpanner.bound-details.right.padding = 2
    c'2 \startTextSpan
    d'2
    e'2
    f'2
    g'2
    a'2 \stopTextSpan ^ \markup {
        \smaller
            \general-align
                #Y
                #DOWN
                \note-by-number
                    #2
                    #0
                    #1
        \upright
            " = 135"
        }
}

%%% END %%%


I'm actually pretty happy with the results shown above. (There's an additional collection of overrides to the TextSpanner bound details that make things look truly professional. I've omitted those here to keep the example reasonable. If anyone wants the complete settings, just let me know.)

QUESTION: the one remaining thing I'm looking for is some way to align the start of the spanner to the *left edge of the page*. Is there any way to do this?

By way of comparison, the break-alignable-interface gives exactly what I'm looking for when I'm working with MetronomeMark objects ...

        \override MetronomeMark.break-align-symbols = #'(left-edge)

... but it looks like TextScript and TextSpanner don't implement the interface (which is understandable).

So is there some sort of something available to, say, anchor markup (as opposed to marks) to the left edge of the page (instead of to a note head)? Sounds like some type of manipulation to the parent of markup. But in many years of using Lily I've never had cause to make that particular type of adjustment.

Advice appreciated,

Trevor.

--
Trevor Bača
address@hidden

Attachment: accelerando-spanner-example.png
Description: PNG image


reply via email to

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