lilypond-user
[Top][All Lists]
Advanced

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

Defining a command to perform a TextSpanner


From: Martyn Quick
Subject: Defining a command to perform a TextSpanner
Date: Wed, 25 Jun 2014 19:18:42 +0100

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.

... and assuming this can be done, where on earth do I read up about such things?

Martyn

reply via email to

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