Trevor Bača wrote:

OK, I was confusing dynamics and text scripts. For text scripts this baseline alignment is very cool. But for dynamics what I'm actually looking for is *center* alignment in the vertical direction (rather than *baseline* aligment). In other words, in Kieren's example above, my preference is to see the p and f center aligned *as though the p were the beginning of a crescendo and the f were the end*.

Is there such a trick for *center* alignment of dynamic marks??

Actually, as long as the dynamics belong to the same
DynamicLineSpanner, i.e. a sequence of absolute dynamics,
hairpins and/or cresc/decresc with not gaps inbetween them,
then this is exactly what you get by default. If you want it
also for dynamics that are separated by some notes so that
they don't belong to the same DynamicLineSpanner, then
you can use exactly the same trick. I just increased the default
value of the staff-padding and kept the default center alignment
of each DynamicText in relation to its DynamicLineSpanner:

\version "2.10.33"

\paper { indent = 0 line-width = 2\in }

music = \relative c''
{
   c2\p^\markup { "gorgeous" } c\f^\markup { "fantastic" }
   c4\p c \f \> c c \! \p
}

\score
{
   {
       \music \break

       \override DynamicLineSpanner #'staff-padding = #2.0
       \override DynamicLineSpanner #'Y-extent = #'(-1 . 1)
       \override TextScript #'Y-extent = #'(-1 . 1)
       \music
   }
}


   /Mats


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to