Dear Tina,
> But doesn’t this work for you?
>
> %%%
> \version "2.24.4"
>
> {
> \after 2. \!
> c'1
> -\tweak Hairpin.color #red
> \<
> }
> %%%
This worked fine on my end, as well.
>
>
> %%%
> crescendo =
> #(define-music-function () () #{ \< #})
>
> {
> \after 2. \!
> c'1 \crescendo
> }
> %%%
>
> It won’t work
[...]
> indeed what is happening is
>
> %
> \after 2. \! c'1
> %
>
> Now it is important to know that post events have higher priority than music
> function. So
>
> %
> \after 2. \! c'1 -\tweak ... \<
> %
>
> is counted as `after(2., \!, c'1-\tweak ... \<)` (in a more typical
> functional
> syntax). But
>
> %
> \after 2. \! c'1 \tweak ... \<
> %
>
> is counted as `after(2., \!, c'1) \tweak ... \<`.
>
This stretch of explanation was very informative for me, so I appreciate your
time detailing it.
Best,
Yoshi
-- -- --
Yoshiaki Onishi
https://github.com/yoshiakionishi/lilypond-snippets