Kieren MacMillan <kieren_macmil...@sympatico.ca> writes:

>
> In the snippet below, I want to tweak a dynamic grob created using Shevek's 
> dynText function (cf. 
> http://lists.gnu.org/archive/html/lilypond-user/2017-07/msg00043.html). But 
> unfortunately, tweaks don't seem to affect it.
>
> How can I change the function such that I can still apply tweaks (X-offset, 
> self-alignment-X, etc.) to the combined dynamic-text grob "at runtime"?

> dynText = #(define-event-function (parser location dyn expr)
>              (markup? markup?)
[...]
>                #{
>                  \tweak DynamicText.X-offset #offset
>                  #(make-dynamic-script mark)
>                #}
>                )
>              )
>
> { c''1-\tweak self-alignment-X #RIGHT \dynText "mp" "test" }
> %%%  SNIPPET ENDS

The tweak applies fine but self-alignment-X is consulted in the normal
callback for X-offset which has been replaced by a callback using the
formula (- 1 (/ width 2)) .  If you want self-alignment-X to be heeded
in there in some manner, you need to incorporate it in the callback for
the offset.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to