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: Janek Warchoł
Subject: Re: Staccato alignment on stem side
Date: Wed, 16 May 2012 18:16:01 +0200

Hi David,

On Wed, May 16, 2012 at 4:22 PM, David Nalesnik
<address@hidden> wrote:
> 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
>  }
> }

Cool!  This should definitely be added to LilyPond itself!

thanks,
Janek



reply via email to

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