Hi, Abraham! On Fri, Jan 29, 2016 at 6:49 PM, Abraham Lee <tisimst.lilyp...@gmail.com> wrote: > On Thu, Jan 28, 2016 at 6:02 PM, Przemyslaw Pawelczyk [via Lilypond] < > ml-node+s1069038n186599...@n5.nabble.com> wrote:
>> 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) Yeah, it works now like when \dynamics are put in Staff. Great! This is the magic sauce to "glue" dynamic text in Dynamics with the notes in Staff. > > 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. >From my tests it looks that changing DynamicText.extra-spacing-width normally works only when dynamics are put on Staff, not if they are on their separate Dynamics. But thanks to "glueing" (i.e. using above mentioned infinite extra-spacing-height trick), extra-spacing-width works too! So now I can also fix dynamic text touching the bar: \override DynamicText.extra-spacing-width = #'(-0.2 . 0.2) Here is the PDF with both overrides: http://paste.przemoc.net/lilypond/piano-centered-dynamics/piano-centered-dynamics-workaround.pdf > > 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. I usually try to use the latest Lilypond available, but good to know that such "glueing" is moderately recent feature. > > Anyway. There you go. Thank you very much! Regards. -- Przemyslaw Pawelczyk Cross-site thinker, rookie composer, Linux apprentice https://soundcloud.com/przemoc86 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user