lilypond-user
[Top][All Lists]
Advanced

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

Re: #(make-dynamic-script)


From: Kieren Richard MacMillan
Subject: Re: #(make-dynamic-script)
Date: Wed, 31 May 2006 07:01:28 -0400

Hi, Vivian:

What I would really like to do, though, is make a dynamic mark
that included normal text (specifically "sub p" or "sub f")

subP = #(make-dynamic-script (markup #:line(#:normal-text #:italic "sub." #:hspace -0.3 #:dynamic "p" )))

[Note that I put in the #:hspace -0.3 because I thought that without it the "sub." was too close to the "p" -- you can adjust this value (or leave it out entirely), according to your preference.

It would save time to just be able to write c4\subp or something similar.

Well, unfortunately this dynamic mark is center-aligned to the notehead, and so you still need to use a \once \override DynamicText #'self-alignment-X = #SOMEVALUE in order to compensate. The sample from the docs uses a #:translate (cons VALUEA VALUEB) construct in order to shift the text within the dynamic itself, e.g.

subPTrans = #(make-dynamic-script (markup #:hspace 0 #:translate (cons 4 0) #:line(#:normal-text #:italic "sub." #:hspace -0.3 #:dynamic "p" )))

However, I find that the extra padding is irritating -- for example, with a leading hairpin:

%% CODE SNIPPET BEGINS
\version "2.9.5"
subP = #(make-dynamic-script (markup #:line(#:normal-text #:italic "sub." #:hspace -0.3 #:dynamic "p" ))) subPTrans = #(make-dynamic-script (markup #:hspace 0 #:translate (cons 4 0) #:line(#:normal-text #:italic "sub." #:hspace -0.3 #:dynamic "p" )))
\relative c''
{
        c4\< c\subP\> c\subPTrans\< c\subPTrans\<
        \once \override DynamicText #'self-alignment-X = #-0.8 c4\subP
}
%% CODE SNIPPET ENDS

The non-padded manually-realigned version (i.e., the last one) is the most satisfying to my eye. Since nobody (hint hint!) has gotten back to me on how to align the dynamic text within the Scheme construct *without* adding all that padding, this is the best I can do for you right now...

Best wishes,
Kieren.




reply via email to

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