[Top][All Lists]

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

Re: fermata and text (markup) on/above one note

From: Trevor Bača
Subject: Re: fermata and text (markup) on/above one note
Date: Thu, 14 Feb 2008 17:55:09 -0600

On Thu, Feb 14, 2008 at 4:26 PM, Mats Bengtsson <address@hidden> wrote:
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

       \music \break

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

OK, that's now officially brilliant. Mats, thanks so much (as usual). And entire .scm file I have sitting in my score directory can now vanish thanks to this single setting -- DynamicLineSpanner #'Y-extent. Excellent.

At the risk of belaboring the point, I'm having trouble understanding *why* this works. Here's an absolutely minimal example:


\version "2.11.39"

\layout { ragged-right = ##t }

\new Staff {
   \override DynamicLineSpanner #'staff-padding = #4
   c'2 \p
   c'2 \f

\new Staff {
   \override DynamicLineSpanner #'staff-padding = #4
   \override DynamicLineSpanner #'Y-extent = #'(0 . 0)
   c'2 \p
   c'2 \f

%%% END %%%

In the first case we get usual (top-aligned) behavior; in the second case we get this excellent (center-aligned) behavior. The only difference is that the second example overrides DynamicLineSpanner #'Y-extent. But notice that the actual pair of values passed to DynamicLineSpanner #'Y-extent doesn't seem to matter because #'(0 . 0) and #'(1 . -1) and in fact #'(10 . -10) all provide this nifty center alignment.

So what's going on here? It seems that merely "turning on" DynamicLineSpanner #'Y-extent is enough to induce vertical center alignment, regardless of the actual value. Is this a good way to conceptualize what's happening here? If so, that's quite an implicit (hidden, even) principle ... ie, that turning on Y-extent switches the origin of alignment from top to center.

Trevor Bača
reply via email to

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