Mark Polesky wrote:

You don't need any fancy scheme, just a music-function:
http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Simple-substitution-functions


Oh, sweet! That was about the easiest thing ever! Thanks for the tip, Mark & Neil. :) This is much more elegant and useful.

Revised in LSR:

http://lsr.dsi.unimi.it/LSR/Item?u=1&id=616

Here's how it looks now (in case you don't want to go to LSR):

%\version "2.12.2"

stringNumberSpanner = #(define-music-function (parser location StringNumber) (string?)
  #{
    \override TextSpanner #'style = #'solid
    \override TextSpanner #'font-size = #-5
\override TextSpanner #'(bound-details left stencil-align-dir-y) = #CENTER \override TextSpanner #'(bound-details left text) = \markup { \circle \number $StringNumber }
  #})


\relative c {
  \clef "treble_8"
  \stringNumberSpanner "5"
  \textSpannerDown
  a8\startTextSpan
  b c d e f\stopTextSpan
  \stringNumberSpanner "4"
  g\startTextSpan a
  bes4 a g2\stopTextSpan
}



_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to