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: Mats Bengtsson
Subject: Re: fermata and text (markup) on/above one note
Date: Thu, 14 Feb 2008 17:38:59 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)



Trevor Bača wrote:
On Thu, Feb 14, 2008 at 8:41 AM, Kieren MacMillan <address@hidden <mailto:address@hidden>> wrote:

    Hi Werner,

    > I don't understand, why the \hspace #0 influences the raise

    As I understand it, the \hspace defines the height of the entire
    markup box -- i.e., it is explicitly taller than either the fermata
    or the (e.g.) "1." -- and thus it is this "larger" box (as set by the
    height of an \hspace object) that is affected by the spacing code.

    You can also use this hint to line up custom dynamics with opposing
    descenders and ascenders, e.g.,

        pp gorgeous    %  all descenders
        pp fantastic    % all ascenders

    will not line up "correctly" by default.



Nice. For the last year or so I've been using a transparent-f trick for the same purpose, for example:

  pppX = #(make-dynamic-script (markup #:combine
   #:transparent #:dynamic "f"
   #:line(#:hspace 0 #:dynamic "ppp" #:hspace 0)))

and

   fffX = #(make-dynamic-script (markup #:combine
   #:transparent #:dynamic "f"
   #:line(#:hspace 0 #:dynamic "fff" #:hspace 0)))

It's looks like craziness, but writing c'4 \ppX c'4 \fffX causes the dynamics to align absolutely perfectly once you've set DynamicLineSpanner #'staff-padding.

I have a definition file of nothing but these custom dynamics that I use exclusively. It's been more than a year since I've used a built-in Lily dynamic like \pp or \ff because the vertical alignment with the transparent-f trick is so much better. (I'd actually suggest changing out the default dynamics definitions in the distro, but not sure if that's the behavior anyone else would actually want.)
I think the magic settings you need to get the default (and custom) dynamics
to align without having to resort to such tricks are:

\override DynamicLineSpanner #'Y-extent = #'(-1 . 1)
\override DynamicText #'Y-offset = #0

As far as I can see (and understand), this gives baseline alignment.
Similar tricks can be used to turn off top/bottom alignment
of text scripts:
\override TextScript #'minimum-Y-extent = #'(-1 . 1)

  /Mats




reply via email to

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