lilypond-user
[Top][All Lists]
Advanced

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

Re: Defining a command to perform a TextSpanner


From: Martyn Quick
Subject: Re: Defining a command to perform a TextSpanner
Date: Sun, 29 Jun 2014 20:45:41 +0100

Thanks for the response.  That works exactly as I wanted.

I've no idea why it does though.  What does the minus sign do?

How on earth does startPM know where to stop the definition?

Is the blank line needed?

I was trying something like:
stopPM = { \stopTextSpan }

but that gave me an error that I didn't understand.

Sorry for what are probably stupid questions, but these more subtle aspects of programming lilypond are taking me a while to get to grips with.

Martyn



From: David Kastrup <address@hidden>
To: Martyn Quick <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Wednesday, 25 June 2014, 19:50
Subject: Re: Defining a command to perform a TextSpanner

Martyn Quick <address@hidden> writes:

> I've been using the TextSpanner in the following way:
>
> \version "2.18.2"
>
> music = {
>   \textSpannerDown
>   \override TextSpanner.bound-details.left.text =
>     \markup { \upright "P.M." }
>   e,8 e,\startTextSpan e, e, e, e, e,\stopTextSpan e,
> }
>
> \score {
>   <<
>   \new Staff { \clef "treble_8"
>     \music
>   }
>   \new TabStaff {
>     \music
>   }
>   >>
> }
>
> This does what is often seen in guitar music, namely using
> "P.M. ... ... ..." to denote when palm-mute is applied to the playing.
>
> Is there a way of defining a function (or more likely a pair of
> functions) to do this more briefly (and more simply in the code.  I
> guess I'm looking for something along the lines of:
>
> " e, \startPM e, e, e, \stopPM e, e, "
>
> to achieve the same effect.

startPM = -\single\textSpannerDown
          -\tweak bound-details.left.text \markup \upright "P.M."



          -\startTextSpan


stopPM = \stopTextSpan

\new Staff { \clef "G_8" e, \startPM e, e, e, \stopPM e, e, }

--
David Kastrup


reply via email to

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