Thank you for this!
I forgot to mention one other limitation of using TextSpanner. As far as I
know, adjacent TextSpanner objects can’t be aligned horizontally, so attempting
something like this—
→ s.p. → ord.
—results in the “→ ord.” above the “→ s.p.”. I’ve included a test program
showing this. Do you know of a workaround for this?
Thanks again!
Nate
\version "2.25.5"
\include "transitionSpanner.ily"
{
\once \transitionSpanner "" "s.p."
1\startTextSpan
\once \transitionSpanner "" "ord."
1\stopTextSpan \startTextSpan
1\stopTextSpan
}
ordinario = #(make-dynamic-script (markup #:normal-text #:whiteout "ord."))
sulPont = #(make-dynamic-script (markup #:normal-text #:whiteout "s.p."))
\score {
\new Staff="strings" {
<<
\new Bowing \with { alignAboveContext = "strings" } {
s1 \tweak minimum-length #10 \>
s \sulPont \tweak minimum-length #10 \>
s \ordinario
}
{ 1 1 1 }
>>
}
\layout {
\context {
\Dynamics
\name Bowing
\alias Dynamics
crescendoSpanner = #'text
decrescendoText = \markup { }
decrescendoSpanner = #'text
\override DynamicTextSpanner.bound-details.right.arrow = ##t
\override DynamicTextSpanner.style = #'line
\override DynamicTextSpanner.whiteout = ##t
}
\inherit-acceptability Bowing Dynamics
}
}
> On Jun 20, 2023, at 6:49 AM, Mark Knoop <[email protected]> wrote:
>
> Hi Nate,
>
> At 06:31 on 20 Jun 2023, Nate Whetsell wrote:
>> Hi,
>
>> I’m trying to figure out the “right” (most flexible, best looking) way
>> to put bow positions like sul pont and sul tasto (really their
>> abbreviations s.p. and s.t.) above a staff with transition arrows,
>> like in Gould’s Behind Bars p. 407. Here are some things I’ve tried:
>
>> • Use a TextSpanner
>> (https://lilypond.org/doc/Documentation/notation/line-spanners), as
>> suggested at
>> https://lists.gnu.org/archive/html/lilypond-user/2017-12/msg00347.html.
>> This has the advantage of being relatively simple to use. Some
>> disadvantages are that the text at the ends of the arrow tends to be
>> misaligned (although this can be fixed with some hacks), and the
>> line-breaking behavior can produce unreadable results.
>
> I've generally come to the conclusion that TextSpanner is the most
> flexible solution for this. My custom function include file is attached
> - it contains some examples at the bottom (commented out by default). I
> think the text alignments are fixed. I'm not sure what problems you're
> having with line-breaking - perhaps the list can help with those?
>
> Regards,
>
> Mark
> <transitionSpanner.ily>
> --
> Mark Knoop