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: Joe Neeman
Subject: Re: [PATCH] Fix for bug #218 (center staccato over stem instead of notehead)
Date: Sat, 29 Nov 2008 10:16:33 -0500

On Fri, 2008-11-28 at 01:29 +0100, Maximilian Albert wrote:
> Hi,
> 
> attached is a patch for bug #218 (see
> http://code.google.com/p/lilypond/issues/detail?id=218). It simply
> tests whether the directions of stem and articulation coincide, and if
> so it shifts the latter sideways. Please note that the patch is just a
> casual attempt to get more familiar with Lilypond's internals and that
> the way it is implemented was derived mostly by trial-and-error and
> sophisticated guessing. So any suggestions for improvement are most
> welcome.

Hi Max,

The main problem with this patch, which Neil has already mentioned, is
that it comes too early in the typesetting process. The engraver step is
used to set up the grobs and their relationships, but not to perform any
of the actual layout (which is done mostly in the callbacks associated
to grob properties). 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).

Also a minor style point: the lilypond code convention is for a space
before the opening brace of a function call.

> BTW, in the bug's description it says that only staccato marks should
> be centered on the stem, but I personally find it more appealing if
> this applies to any kind of articulation. If you think otherwise, I'd
> be happy to adapt the patch but I don't know how to test whether the
> grob actually is a staccato mark or something else.

I'm fine with it applying to all articulations.

Joe






reply via email to

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