[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wish: Syntax of text spanners
From: |
Andrew Bernard |
Subject: |
Re: Wish: Syntax of text spanners |
Date: |
Wed, 22 Jul 2020 13:56:07 +1000 |
Well, text spanners are pressed into service for dozens of things.
Here's a random example from my scores:
% text spanner for repeat
\once \override TextSpanner.style = #'line
\once \override TextSpanner.thickness = #2
\once \override TextSpanner.bound-details.left.text =
\markup {
\path #0.25 #leftBracketPath
\general-align #Y #CENTER \sans \upright " repeat + "
}
\once \override TextSpanner.bound-details.right.text =
\markup {
\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-broken.padding = ##f
\override TextSpanner.bound-details.right.padding = #8
\override TextSpanner.bound-details.left.padding = #-4
I have no trouble with that personally, and I require all the fine detail.
I can see your objections, but removing this capability from lilypond
would never get up as a suggestion. Furthermore, there is nothing
stopping your creating your own music functions and so do to achieve
what you have described,
Here's an example of that, for doing things like SP-----> NAT for violin.
% use with startTextSpan and stopTextSpan
stringTechnique =
#(define-music-function
(left right)
(markup? markup?)
"string technique markup"
#{
\once \override TextSpanner.font-name = "Libertinus Sans Bold"
\once \override TextSpanner.font-size = #-4
\once \override TextSpanner.bound-padding = #1.0
\once \override TextSpanner.style = #'line
\once \override TextSpanner.bound-details.right.arrow = ##t
\once \override TextSpanner.bound-details.left.text = #left
\once \override TextSpanner.bound-details.right.text = #right
\once \override TextSpanner.bound-details.right.padding = #0.6
\once \override TextSpanner.bound-details.right.stencil-align-dir-y = #CENTER
\once \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
\once \override TextSpanner.bound-details.left-broken.text = ##f
\once \override TextSpanner.bound-details.right-broken.text = ##f
#})
Given the enormous flexibility in defining lilypond functions and the
use of Scheme for extensions and customisations, I don't think rushing
to change syntax is a good idea, apart from the fact that you would
have huge problems with backwards compatibility.
Andrew
On Wed, 22 Jul 2020 at 07:28, Martín Rincón Botero
<martinrinconbotero@gmail.com> wrote:
>
> Hey all,
>
> this is a feature request. I'm sorry, if this is already being discussed or
> if a solution is coming behind the scenes. I couldn't find any message other
> than a mention to https://code.google.com/archive/p/lilypond/issues/3176. I
> find the lack of a proper text spanner syntax uncomfortable.