lilypond-user
[Top][All Lists]
Advanced

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

Re: Gradual arrow with text at both ends


From: Ben
Subject: Re: Gradual arrow with text at both ends
Date: Wed, 13 Dec 2017 16:26:16 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


On 12/13/2017 1:58 PM, Jörgen Häll wrote:
Hi

This is my first post here, since I'm rather new at Lilypond. I have been searching but could not find an answer for this. 
Very often, I use arrows to imply a gradual change from for example sul ponticello to sul tasto for strings. I am attaching an example from my regular notation software of what I am after.

I have tried making a tiny example, and it is attached to this email. I have removed the code that makes the line solid etc.
I also attached the pdf of the output.
The issue is apparent in this example, the "s.t" and "s.p." texts do not align properly and the arrow clashes with the "s.p." text.

A workaround that I've been able to use is to add s.p. as regular text code, such as ^"s.p."

But I am looking for a way to have this as a simple code block that I can paste every time I use this, since it's a notation I often use.

I've tried various padding commands for TextSpanner but nothing has worked. Since I'm still learning Lilypond I have most likely just missed something obvious.

Infogad bild 1

Best regards,
Jörgen



Hi Jorgen,

I saved a snippet that I found in the lsr a while back - it does something like that, here's the code that I use:


%%%%%%%%%%%%%
\relative c'' {
  \override TextSpanner.bound-padding = #1.0
  \override TextSpanner.style = #'line
  \override TextSpanner.bound-details.right.arrow = ##t
  \override TextSpanner.bound-details.left.text = #"s.t."
  \override TextSpanner.bound-details.right.text = #"s.p."
  \override TextSpanner.bound-details.right.padding = #0.6

  \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER
  \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER

  a8\startTextSpan gis a4 b b,
  g'4 c\stopTextSpan c2
}

Is this helpful?

(see attached)

Welcome to LilyPond :)


Attachment: line.png
Description: PNG image


reply via email to

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