lilypond-user
[Top][All Lists]
Advanced

[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: Fri, 15 Feb 2008 09:10:28 -0600

On Fri, Feb 15, 2008 at 1:46 AM, Mats Bengtsson <address@hidden> wrote:
Quoting Trevor Ba?a <address@hidden>:

> At the risk of belaboring the point, I'm having trouble understanding *why*
> this works. Here's an absolutely minimal example:
>
>
> %%% TURNING ON Y-EXTENT %%%
>
> \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.

To understand why, you have to understand what the default setting
of DynamicLineSpanner #'Y-extent does, namely to calculate the actual
extent of the included dynamics indications. Then, once this has done,
the placement of the full DynamicLineSpanner is determined using the
padding and staff-padding properties, that specify the distance from
the upper edge of the full DynamicLineSpanner to the closest note and/or
staff. When you instead specify a fixed value of Y-extent, LilyPond
won't care about the actual extent of the dynamics and align it as if
the top was at, say, 1 (if you set #'Y-extent = #'(-1 . 1)) relative to
the internal reference point of the DynamicLineSpanner. To complete the
picture, every element included in the DynamicLineSpanner, such as a
Hairpin or DynamicText makes its own alignment relative to the
reference point of the DynamicLineSpanner.


Excellent. Thank you so much for the  explanation. And I think what I was missing is the basic concept that turning Y-extent on is the point at which we cause Lily to ignore the actual, graphic dimensions (in the y direction) of various objects. Makes perfect sense.

Thanks again, Mats.



--
Trevor Bača
address@hidden
reply via email to

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