lilypond-user
[Top][All Lists]
Advanced

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

Re: use guile to set specific extra-offset values if stem direction is u


From: padovani
Subject: Re: use guile to set specific extra-offset values if stem direction is up or down
Date: Mon, 21 May 2012 13:02:18 -0300

Oh, I'm sorry... I was reading everything in a hurry and didn't got the second part of your message.

Thank you again!

2012/5/21 David Nalesnik <address@hidden>
Hi José, 

On Mon, May 21, 2012 at 10:20 AM, padovani <address@hidden> wrote:
Em 5/21/12 11:44 AM, David Nalesnik escreveu:

  \override Stem #'extra-offset =
    #(lambda (grob) (if (eqv? (ly:stem::calc-direction grob) UP)
'(-0.02 . -0.25) '(0.02 . 0.25)))

Hello David,

thank you very much!

Now I see that ly:stem::calc-direction only gives me the standard Stem direction, but if I am using some \stemDown or \stemUp before the note, the lambda function will ignore the actual direction of the Stem and adjust stem offsets accordingly to the standard direction.

Do you (or anybody else) know a way to access the actual direction of the Stem?

Yes, in this instance the second option I gave (using ly:grob-property to look up 'direction) will give you the proper direction after a \stemUp or \stemDown.

-David 


reply via email to

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