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: David Kastrup
Subject: Re: Defining a command to perform a TextSpanner
Date: Wed, 25 Jun 2014 20:50:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

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]