lilypond-user
[Top][All Lists]
Advanced

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

Re: Reverting TextSpanner properties


From: Aaron Hill
Subject: Re: Reverting TextSpanner properties
Date: Thu, 07 Feb 2019 09:25:44 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-02-07 9:06 am, Reggie wrote:
David Kastrup wrote
Andrew Bernard <

andrew.bernard@

> writes:

Hi David,

Really great advice and useful to know. However, I have a long section
run
of spanners for sul ponticello to natural. I did'nt want to tweak every
occurrence for literally a hundred times, or call a function for each
spanner each time. So it's kind of 'semi-permanent'.

Well, it's a matter of

sulPont = -\single \spToNatSpan \startTextSpan
stopSulPont = -\endTextSpan

And then you use \sulPont and \stopSulPont where you now use
\startTextSpan and \stopTextSpan .  I find that more straightforward
than what you use but of course it is slightly less efficient.  But
probably not a measurable difference.

--
David Kastrup

_______________________________________________
lilypond-user mailing list

lilypond-user@

https://lists.gnu.org/mailman/listinfo/lilypond-user

Hello David. I added your suggestions but nothing compiles correctly even after I replaced the functions you speak of. How can this be fixed to use
your suggestion correctly? :))

It's \stopTextSpan, not \endTextSpan.

Note that if you use \sulPont and \stopSulPont, you would no longer need (or want) to use \spToNatSpan explicitly. Also, you would still need to use \startTextSpan and \stopTextSpan to get the basic spanner.

%%%%
\version "2.19.82"

spToNatSpan = {
  \override TextSpanner.font-size = #-4
  \override TextSpanner.bound-padding = #1.0
  \override TextSpanner.style = #'line
  \override TextSpanner.bound-details.right.arrow = ##t
  \override TextSpanner.bound-details.left.text = #"SP"
  \override TextSpanner.bound-details.right.text = #"NAT"
  \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
  \override TextSpanner.bound-details.left-broken.text = ##f
  \override TextSpanner.bound-details.right-broken.text = ##f
}

sulPont = -\single \spToNatSpan \startTextSpan
stopSulPont = -\stopTextSpan

treble = {
  \time 4/4

  %% \spToNatSpan %% <== NOT NEEDED
  c''4\sulPont c'' c'' c''\stopSulPont |
  c'' c'' c''\sulPont c'' |
  c'' c'' c'' c'' |
  \break
  c'' c''\stopSulPont c'' c''\sulPont |
  \break
  c''\stopSulPont c'' c'' c'' |
  \break
  % how to revert to basic TextSpanner here?
  %% \revert TextSpanner.bound-details %% <== NOT NEEDED
  c''\startTextSpan c''\stopTextSpan c'' c'' |
}

\score {
  \new Staff \treble
  \layout {}
}
%%%%

-- Aaron Hill



reply via email to

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