lilypond-user
[Top][All Lists]
Advanced

[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 ?

fingering_restez.ly
<http://lilypond.1069038.n5.nabble.com/file/n166031/fingering_restez.ly>



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;
cpkc@
&gt; &lt;mailto:
cpkc@
&gt;> wrote:
     Further Googling gives http://lsr.dsi.unimi.it/LSR/Snippet?id=616
     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)
= #CENTER
      \override TextSpanner #'(bound-details left text) = \markup {
\circle \number $StringNumber }
      #(begin
         (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
$music)))))
   #})
\relative c {
  \clef "treble_8"
  \textSpannerDown
  \stringNumberSpanner "5" { a8 b c d e f }
  \stringNumberSpanner "4" { g a bes4 a g2 }
}

Happy practicing!

-David

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

Thanks!

Colin

--
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
lilypond-user@
https://lists.gnu.org/mailman/listinfo/lilypond-user


Could it be this checkin?

http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=6d611627eaef3fb5c754bdde106cd16c1ed23f31

James



reply via email to

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