lilypond-user
[Top][All Lists]
Advanced

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

Re: Cello fingering indications


From: David Kastrup
Subject: Re: Cello fingering indications
Date: Fri, 05 Sep 2014 15:03:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

James <address@hidden> writes:

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

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

(labelled as 2.19.7 but unlikely to work there).

>> 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)))

[...]

> Could it be this checkin?
>
> http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=6d611627eaef3fb5c754bdde106cd16c1ed23f31

That definitely touches code exercised by this snippet.  But the
question was about version 2.19.10 and the commit is present only
starting with version 2.19.13.

The problem quite looks like the old friend issue 2240, version 2.15.28.
The LSR should provide an updated snippet by now I should think.  If
not, ask back.  A lame workaround would be to make sure that the first
element of the music following stringNumberSpanner is a chord, like

\stringNumberSpanner #3 { <c>8 ... }

The lame workaround can be automated by starting the function body
(right *before* #{ ... #}) with
(set! music (event-chord-wrap! music parser))

This results in music consisting of "chords only".  Unless you do
further processing with the music (like \displayLilyMusic ...) this
usually is no problem.

-- 
David Kastrup



reply via email to

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