lilypond-user
[Top][All Lists]
Advanced

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

Re: string-lines


From: Jonathan Kulp
Subject: Re: string-lines
Date: Thu, 09 Jul 2009 15:49:23 -0500
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

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
}





reply via email to

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