[Top][All Lists]

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

Re: Cello fingering indications

From: James
Subject: Re: Cello fingering indications
Date: Fri, 05 Sep 2014 13:09:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 04/09/14 01:46, MarcM wrote:
Anyone knows why the following snippet does not print the spanner with
version 2.19.10 ?

Colin Campbell-8 wrote
On 11-10-31 08:33 PM, David Nalesnik wrote:
Hi Colin,

On Sun, Oct 30, 2011 at 9:50 PM, Colin Campbell &lt;
&gt; &lt;mailto:
&gt;> wrote:
     Further Googling gives
     which is closer in appearance, but I haven't the Scheme fu to
     modify the stringNumberSpanner function to incorporate the
     startTextSpan and number of notes. Ideally, one would wind up with
     something like a8\fSpan {"5" 4} which would extend a line for 4 of
     the note value of the starting note.

This seems to do the trick:

  \version "2.14.2"

stringNumberSpanner =
#(define-music-function (parser location StringNumber music)
    (string? ly:music?)
      \override Voice.TextSpanner #'style = #'solid
      \override Voice.TextSpanner #'font-size = #-5
      \override TextSpanner #'(bound-details left stencil-align-dir-y)
      \override TextSpanner #'(bound-details left text) = \markup {
\circle \number $StringNumber }
         (let* ((elts (ly:music-property $music 'elements)))
           (set! (ly:music-property (car elts) 'elements)
             (cons (make-music 'TextSpanEvent 'span-direction -1)
                   (ly:music-property (car elts) 'elements)))
           (set! (ly:music-property (car (reverse elts)) 'elements)
             (cons (make-music 'TextSpanEvent 'span-direction 1)
                   (ly:music-property (car (reverse elts)) 'elements)))
           (ly:export (make-music 'SequentialMusic 'elements (list
\relative c {
  \clef "treble_8"
  \stringNumberSpanner "5" { a8 b c d e f }
  \stringNumberSpanner "4" { g a bes4 a g2 }

Happy practicing!


Brilliant, David, simply brilliant!  No wonder I rave about this group
every chance I get.



I've learned that you shouldn't go through life with a catcher's mitt on
both hands.
You need to be able to throw something back.
-Maya Angelou, poet (1928- )

lilypond-user mailing list

Could it be this checkin?;a=commit;h=6d611627eaef3fb5c754bdde106cd16c1ed23f31


reply via email to

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