lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix for bug #218 (center staccato over stem instead of noteh


From: Maximilian Albert
Subject: Re: [PATCH] Fix for bug #218 (center staccato over stem instead of notehead)
Date: Tue, 2 Dec 2008 21:10:50 +0100

Hi Joe, Neil,

thanks a lot for your quick and helpful responses!

> The right place to look, therefore, is at the
> X-offset property of the Script grob, which is set in
> scm/define-grobs.scm to script-interface::calc-x-offset (which lives in
> scm/output-lib.scm).

OK, so I only need to adapt script-interface::calc-x-offset so that if
the stem and articulation have the same direction it calculates a
different horizontal shift, correct? Attached is a patch which
implements this (it took me a bit to figure out which scheme functions
yield the needed properties, but I hope I got it right - comments are
again welcome).

One Remark: I use (ly:grob-relative-coordinate stem-grob common-refp
X) to compute the relative offset of the articulation grob w.r.t. the
stem grob. I suppose that in principle this should read

  (- (ly:grob-relative-coordinate stem-grob common-refp X)
     (ly:grob-relative-coordinate grob common-refp X))

but the second number always seems to be 0 so I omitted it. Is this a
safe assumption?

> I'm fine with it applying to all articulations.

Just today I saw an example where a marcato over an up-stem half note
was _not_ shifted and I liked it better. So I'm wondering if for now
we should only implement the shifting for staccato marks until we have
better rules for other articulation types (e.g., should the shifting
depend on whether the notes are beamed or not, should it only apply to
certain note values?). I haven't included this in the patch because I
couldn't find a scheme equivalent for testing the 'articulation-type
property which Neil mentioned. Any hints?

Thanks again,
Max

Attachment: 0001-Fix-for-bug-218-if-articulation-is-over-the-stem.patch
Description: Text Data


reply via email to

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