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: Tue, 22 May 2012 19:34:06 +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
>  }
> }

i wanted to include your engraver in Fried Songs project, but there's an error.
Unfortunately i don't have time to debug this problem at the moment,
but maybe the error message will give you an idea what is happening?

In procedure string= in expression (string= (ly:prob-property # #) "staccato"):
Wrong type argument in position 1 (expecting string): ()

I've just pasted the definition and context modification to main .ly
file...  When i used it as a separate snippet everything was fine.

best,
Janek



reply via email to

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