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 14:25:59 -0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Hi again,

so.. as the flags are now separate objects (2.15.38), I'm having problems to move them to the same place that I am moving the stems... if I just reproduce the lambda function I am using with Stems with flags, it does not work...

\once \override Stem #'extra-offset =
        #(lambda (grob)
         (if (eq? (ly:grob-property grob 'direction) UP)
          '(-0.02 . -0.25) '(0.02 . 0.25)))

%this fails
\once \override Flag #'extra-offset =
        #(lambda (grob)
         (if (eq? (ly:grob-property grob 'direction) UP)
          '(-0.02 . -0.25) '(0.02 . 0.25)))

So, is there a way to know the Flag direction? Or maybe a wat to access the Stem's grob from the Flag one (so that I can point the function to the Stem properties?).

Thank you again,

José


Em 5/21/12 1:10 PM, David Nalesnik escreveu:
José,

On Mon, May 21, 2012 at 11:02 AM, padovani <address@hidden
<mailto:address@hidden>> wrote:

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


No problem!  I learned something new about ly:stem::calc-direction
because of your email: didn't know that it calculates "ideal" directions.

-David


--
http://zepadovani.info



reply via email to

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