bug-lilypond
[Top][All Lists]
Advanced

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

Re: Staccato alignment on stem side


From: David Nalesnik
Subject: Re: Staccato alignment on stem side
Date: Wed, 16 May 2012 09:22:37 -0500

Hi Urs,

On Wed, May 16, 2012 at 4:02 AM, Urs Liska <address@hidden> wrote:

> Am 16.05.2012 10:50, schrieb Colin Hall:
>
>  Urs Liska<lilyliska<at>  googlemail.com>  writes:
>>
>>> The following example shows that staccato points are aligned differently
>>> from other articulations when on the stem side.
>>>
>> Thanks, Urs. I reproduced this on 2.12.3 and 2.15.38 so I have created a
>> tracker
>> here:
>>
>> http://code.google.com/p/**lilypond/issues/detail?id=2535<http://code.google.com/p/lilypond/issues/detail?id=2535>
>>
>> Cheers,
>> Colin.
>>
>>
>> ______________________________**_________________
>> bug-lilypond mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/**listinfo/bug-lilypond<https://lists.gnu.org/mailman/listinfo/bug-lilypond>
>>
> But then again, what _is_ intended behaviour?
> As I understand it the staccato is deliberately placed nearer to the stem.
>

Yes, in script.scm it is assigned a default of 0.5 for 'toward-stem-shift,
so it appears mid-way between the stem and center of the notehead.

What should be the solution:
> - align all articulations like the staccato if on the stem side?
> - align a staccato non-default if there are other articulations present?
>

If you like this last orientation (I do), try this as a workaround:

\version "2.15.38"

#(define stacc-corrector
  (lambda (ctx)
    (let ((articulations '())
          (staccato '()))
      (make-engraver
        (acknowledgers ((script-interface engraver grob source-engraver)
          (set! articulations (cons grob articulations))
          (if (string= (ly:prob-property (event-cause grob)
'articulation-type) "staccato")
              (set! staccato grob))))
       ((stop-translation-timestep trans)
         (if (and (ly:grob? staccato)
                  (or (> (length articulations) 1)
                      (boolean? (ly:prob-property (event-cause staccato)
'parenthesize))))
             (set! (ly:grob-property staccato 'toward-stem-shift) 0))
         (set! articulations '())
         (set! staccato '()))))))

\relative e'' {
 e-. -| -- e-\parenthesize -. -|--
 \voiceTwo
 e-. -| -- e-\parenthesize -. -|--
 e-\parenthesize -. e-.
 \voiceOne
 e,-- e-. e-\parenthesize -.
}

\layout {
  \context {
    \Staff
    \consists #stacc-corrector
  }
}

As usual, simpler suggestions welcome!

HTH,
David


reply via email to

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