[Top][All Lists]

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

Re: Piano centered dynamics - dealing with bar collisions

From: Abraham Lee
Subject: Re: Piano centered dynamics - dealing with bar collisions
Date: Fri, 29 Jan 2016 10:49:33 -0700


On Thu, Jan 28, 2016 at 6:02 PM, Przemyslaw Pawelczyk [via Lilypond] <
address@hidden> wrote:

> Hi!
> There is a piano centered dynamics template that was present in
> Lilypond Learning Manual for v2.14, but is not available in recent
> versions:
> http://www.lilypond.org/doc/v2.14/Documentation/learning/piano-templates
> If we take it (w/o midi part, which is not needed here) and add s1 in
> everything (i.e. upper, lower, dynamics, pedal) at the beginning, then
> we can see that \fff overlaps the piano staff bar:
> http://paste.przemoc.net/lilypond/piano-centered-dynamics/
> How to make dynamic text not overlap the bar, yet shift the note
> column (not sure if I'm using the correct term here) appropriately, so
> the text would remain centered?
> (This mostly works when \dynamics are put into particular Staff [only
> mostly, because \fff remains then too close to the bar, almost
> touching it], but I want to have one \dynamics in separate Dynamics
> between upper and lower Staff within PianoStaff.)
> My half-workaround is setting DynamicText.X-offset (which in this
> particular example seems ok with value -0.3, but it doesn't work that
> well in general), but then DynamicText stops being centered and
> depending on width of the dynamic text, it may be almost unnoticeable
> or looks awfully wrong.
> I hope there are some better solutions.

I, too, have been trying to figure this one out and it appears that we now
have a solution (though it appears to not be documented in the IR, for some
reason--CC-ing the bug-list). It turns out that all you need to add the
following to the appropriate context (Dynamics, in your case):

\override DynamicText.extra-spacing-height = #'(-inf.0 . +inf.0)

That should get you on your way! I've always been puzzled that
extra-spacing-width doesn't change this at all (maybe I just don't know how
to use it properly). The LyricText grob does this SpanBar collision
avoidance by default, so I was confused as to why DynamicText couldn't do
the same.

BTW, this does NOT work with 2.18.2, but it does with 2.19.35 at least.
Haven't checked the other devel versions.

Anyway. There you go.


reply via email to

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