lilypond-user
[Top][All Lists]
Advanced

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

Re: tweaks don't apply to post-function grob


From: David Kastrup
Subject: Re: tweaks don't apply to post-function grob
Date: Tue, 15 Aug 2017 07:41:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Kieren MacMillan <address@hidden> 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



reply via email to

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