[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function/macro for "on the fly" dynamics+text
From: |
Kieren MacMillan |
Subject: |
function/macro for "on the fly" dynamics+text |
Date: |
Sat, 4 Mar 2017 16:59:47 -0500 |
Hello all,
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:
\version "2.18.2"
\language english
#(define (make-dynamic-extra dynamic string)
(make-music
'AbsoluteDynamicEvent
'text
(markup #:concat (
dynamic #:hspace 1
#:normal-text #:italic string))))
ppSub =
-\tweak self-alignment-X #-0.75
#(make-dynamic-extra "pp" "sub.")
{ c''4\ppSub d'' e'' f'’ }
This has several problems:
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. ;)
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.
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”).
Is there a way that such things can be created and self-tweaked on the fly? If
so, what’s the best interface?
Thanks,
Kieren.
________________________________
Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden
- function/macro for "on the fly" dynamics+text,
Kieren MacMillan <=