lilypond-user
[Top][All Lists]
Advanced

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

Re: markup dynamics wrong size


From: Mats Bengtsson
Subject: Re: markup dynamics wrong size
Date: Fri, 08 Aug 2008 00:07:47 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20061113 Debian/1.7.8-1sarge8

Eric Flesher wrote:


Longer dynamic strings (e.g. "p delicato", "crescendo", etc.) that are engraved
as dynamic scripts in this fashion end up getting centered, as a text string,
horizontally under the notehead. This necessitates offsetting them somehow; my
immediate workaround is to apply
\once \override DynamicText #'extra-offset = #'( x . y )
to shift the dynamic string to the appropriate position.

With this in mind, however, is there a means of doing the following:

a) Defining a dynamic text string that will left-align to the notehead? This is
generally what is desired for markings such as "cresc." "dim.", plus other
expressive markings ("dolce", etc.) that stand alone, i.e. without a dynamic
marking such as "p", "f", etc.
It's tricky (well, see below) to get the alignment into the dynamic indication itself. However, you can add a
\once \override DynamicText #'self-alignment-X = #LEFT
before the note with the dynamics, to make it left aligned.

To do the alignment within each dynamic indication, you have to
turn off the default alignment mechanism (which just looks at the
left and right edge of the full markup and ignores the internal
alignment point of the markup) by
\override DynamicText #'X-offset = ##f
Then, you can specify the alignment within each markup:

\version "2.10.33"
% Left alignment is the default for markups:
pdelicatomarkup = \markup{ p \normal-text \italic delicato }
pdelicato = #(make-dynamic-script pdelicatomarkup)
moltofmarkup = \markup{\right-align \line {\normal-text \italic molto \dynamic f }}
moltof = #(make-dynamic-script moltofmarkup)
\relative c'{
 \override DynamicText #'X-offset = ##f
 c \moltof d \pdelicato
}

b) Defining a dynamic text string that centers the dynamic mark ("p", "f", etc.)
under the notehead as per usual, while allowing any modifiers in the string
(e.g. "dim.", "dolce", etc.) to follow to the right?
One possibility is to use the above described method with
\halign #0.8 ...
as a replacement for
\left-align
for example (you may need some other value than 0.8, use trial and error).
See the documentation of \halign at
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Align
for more information.

However, if the dynamic mark is to be followed by "dim", then the
normal solution is

\version "2.10.33"
\relative c'{ \setTextDim c \f \> d e f g a b c \! }

The manual describes how to change the text to something else, but
conceptually, this is perhaps not the best solution for p dolce, for example,
even though it will provide the desired layout.

I know that this latter, in particular, is a rather sophisticated request, but
it would be worth being able to automate such issues that are likely to occur
frequently.
Yes, it would be very nice to be able to specify the alignment point
of a markup in a more convenient way.

   /Mats




reply via email to

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