[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: applying a tweak or callback to an \after-ed grob
From: |
Thomas Morley |
Subject: |
Re: applying a tweak or callback to an \after-ed grob |
Date: |
Sat, 8 Oct 2016 20:09:34 +0200 |
2016-10-08 20:02 GMT+02:00 David Kastrup <address@hidden>:
> Kieren MacMillan <address@hidden> writes:
>
>> Hi all,
>>
>> I’ve been using David K’s lovely \after function (which should, IMO, be
>> polished up and rolled into the distro!) to great effect in my recent
>> engravings.
>>
>> However, I’m having difficulty figuring out how to apply tweaks to the grobs
>> that are \after-ed.
>> For example, see the snippet included below.
>>
>> Any hints would be appreciated.
>>
>> Thanks,
>> Kieren.
>>
>> ________________________
>>
>> %%% SNIPPET BEGINS
>> \version "2.19"
>>
>> \paper { ragged-right = ##f }
>>
>> hairpinWithCenteredText =
>> #(define-music-function (parser location text) (markup?)
>> #{
>> \once \override Voice.Hairpin.after-line-breaking =
>
> [...]
>
> That's not a tweak.
>
> _That's_ a tweak:
>
>
>
>
> --
> David Kastrup
Or transform the override into a tweak:
test = {
%% no need for second once, it's already in `hairpinWithCenteredText'
\hairpinPoco g1\< g\!
\after 2 \single \hairpinPoco \< g1 g\!
}
\score { \test }
Cheers,
Harm