opensubscriber
   Find in this group all groups
 
Unknown more information…

b : bug-lilypond@gnu.org 23 May 2012 • 3:14AM -0400

Re: Staccato alignment on stem side
by Janek WarchoĊ‚

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi David,

On Tue, May 22, 2012 at 8:33 PM, David Nalesnik
<david.nalesnik@gmai...> wrote:
> Hmmm...  I'm really not sure.  I tried it with a multi-voice example and no
> problems there...  I guess I would really need to see an example where it's
> breaking down.

Unfortunately, as it's a part of the big project, it has all sorts of
file dependencies and would take a lot of time to untangle it.

> But since staccato is the only articulation that has a value set for
> 'toward-stem-shift, you could just override it to 0 and revert it for when
> you want the staccato-alone orientation.  (I must say that the engraver
> seems like overkill! :)  )

that's what i did.  But general solutions are better :)


On Tue, May 22, 2012 at 8:42 PM, David Kastrup <dak@gnu....> wrote:
> from the docs:
>
> script-interface:
>
> This grob interface is used in the following graphical object(s): *note
> AccidentalSuggestion::, *note DynamicText:: and *note Script::.
>
> Quite a lot of stuff created without an articulation-type, so you should
> be using eqv? rather than string= ...

I've tried to do as you suggest:

#(define stacc-corrector
(lambda (ctx)
   (let ((articulations '())
         (staccato '()))
     (make-engraver
       (acknowledgers ((script-interface engraver grob source-engraver)
         (set! articulations (cons grob articulations))
         (if (eqv? (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 {
   \Voice
   \consists #stacc-corrector
}
}

and the error is gone, but unfortunately the side-effect is that the
code doesn't work anymore.

Janek

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu....
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.