[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cello fingering indications
From: |
MarcM |
Subject: |
Re: Cello fingering indications |
Date: |
Wed, 3 Sep 2014 17:46:10 -0700 (PDT) |
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 <
> cpkc@
>
> > <mailto:
> cpkc@
> >> 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
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Cello-fingering-indications-tp34653p166031.html
Sent from the User mailing list archive at Nabble.com.
- Re: Cello fingering indications,
MarcM <=