lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix for bug #218 (center staccato over stem instead of noteh


From: Maximilian Albert
Subject: Re: [PATCH] Fix for bug #218 (center staccato over stem instead of notehead)
Date: Mon, 8 Dec 2008 17:22:48 +0100

2008/12/8 Neil Puttock <address@hidden>:

> This seems to work fine. :)
>
> I've run regtests with and without a default for staccati, and both
> compile without any problems (see the attached image for the expected
> change in staccato-pos.ly when 'shifted-towards-stem  is set to 0.5 in
> script.scm).

Awesome to hear and thanks for testing! What do you guys think, should
a default value be set, and if so which one? I guess something between
0.5 and 0.75 would be sensible, according to Reinholds findings.


> Since LilyPond uses American English for docs/properties,
> shifted-toward-stem is probably better.
>
> +  (let* ((shift (ly:grob-property grob 'shifted-towards-stem))
>
> If you set a default value here, then you won't have to check whether
> it's null later:

Thanks for these suggestions, I will include them in the next patch.


>> [...] what would I need to write instead of
>>
>>  \override Script #'shifted-towards-stem = #'1.0
>>
>> if I wanted to enable shifting only for staccato marks, say?
>
> Something like this should do it:
>
> #(define ((shift-articulation type amount) grob)
>  (let ((artic (ly:event-property
>                 (ly:grob-property grob 'cause)
>                 'articulation-type)))
>    (if (equal? type artic)
>      amount
>      0)))
>
> \override Script #'shifted-towards-stem = #(shift-articulation "staccato" 1)

Great! With what you had written in your last email, something along
these lines should have crossed my mind...

Could it be worthwhile to wire this function into lilypond itself,
since I suppose that most people would want to change the property
only for specific scripts? Or is it sufficient to put it into the docs
somewhere (perhaps in the corresponding LSR snippet itself)?

Best regards,
Max




reply via email to

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