[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function/macro for "on the fly" dynamics+text
From: |
Malte Meyn |
Subject: |
Re: function/macro for "on the fly" dynamics+text |
Date: |
Sat, 4 Mar 2017 23:18:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
Am 04.03.2017 um 22:59 schrieb Kieren MacMillan:
> Many scores use dynamics like “pp sub.” or “f dolce” etc. In order to build
> such a grob as a DynamicText, I use the following:
> […]
> 1. I have to define a macro for every single combination in every score. For
> ppSub and the like, which will be used often, that’s not so bad… but it’s a
> pain for something like “fffff, as ridiculously loud as physically possible”,
> which I will hopefully only use once. ;)
>
> 3. I need a different make-music function for something like “subPP” (i.e.,
> where the order of dynamic and text is reversed).
>
> 4. I need a different make-music function when it’s simply a text (e.g.,
> “cresc. poco a poco”).
Do you know the \dynamic function from openlilylib? You can find it at
openlilylib/input-shorthands/easy-custom-dynamics and it is used as follows:
{
c\p
d\dynamic "p" % or \dynamic p (same output as \p)
e\dynamic "p e dolce"
f\dynamic "più p"
g\dynamic "cresc. poco a poco"
}
The function builds a markup where every word containing *only* p, f, m,
s, z, r (f. e. sffz) is printed in dynamic letters and every other word
(f. e. poco) is printed in normal-text italics. And it supports
underscores for spaces as I just noticed so you could omit the "":
{
% all of the following have the same output
f\dynamic "più p"
f\dynamic "più_p"
f\dynamic più_p
}
> 2. I have to manually try-and-errorize the self-alignment-X and hspace
> value(s) for each dynamic I define this way. Graham’s original
> make-dynamic-extra function tried to handle this issue, but the X-offset
> tweak made it impossible to reset post-hoc (e.g. when using the
> edition-engraver), so I had to stop using it.
I’m not sure about self-alignment-X behaviour but for long dynamics like
"ppppp" at start of measure (colliding with bar line) or "p dolce e
espressivo" usually setting self-alignment-X to #LEFT and X-offset to 0
works for me.