[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: does the custom \dynamic function create DynamicText grobs?
From: |
Kieren MacMillan |
Subject: |
Re: does the custom \dynamic function create DynamicText grobs? |
Date: |
Sat, 10 Feb 2018 20:41:24 -0500 |
Hi Thomas,
This seems to work:
\override DynamicText.after-line-breaking =
#(lambda (grob) (ly:grob-suicide! grob))
But this is the Scheme equivalent of me shooting a machine gun with a blindfold
on, so please tell me if I've done something wrong.
Thanks,
Kieren.
> On Feb 10, 2018, at 8:36 PM, Thomas Morley <address@hidden> wrote:
>
> 2018-02-11 2:08 GMT+01:00 Kieren MacMillan <address@hidden>:
>> Hi Thomas,
>>
>> Thanks for the quick response.
>>
>>> DynamicText is caused, but you can't nuke the stencil via
>>> \omit (which would be stencil-override).
>>
>> Ah.
>>
>>> But you could do it later.
>>> Applying
>>> \override DynamicText.after-line-breaking =
>>> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>>> will work, though.
>>
>> That is like \hide rather than \omit, no?
>> (At least that's how it _appears_ to behave when I apply it to my
>> non-minimal "real world" score.)
>>
>> For now, this works fine — I'm just trying to blank out all dynamics, so I
>> can print out a score and pencil in dynamics on the score, away from the
>> computer — but I am curious if there's a real "stencil nuke" (in case I ever
>> need to do it in an edition-engraver tweak, for example).
>
>
>
> Well, not a real "stencil nuke", but in this case you could use
> X-offset and trash the stencil as a side-effect.
>
> At least:
> {
> \override DynamicText.X-offset ={
> \override DynamicText.X-offset =
> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
> c'1
> -\tweak before-line-breaking
> #(lambda (grob)
> (ly:grob-set-property! grob 'stencil
> (grob-interpret-markup grob "very long dynamic")))
> -#(make-music 'AbsoluteDynamicEvent)
> }
> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
> c'1
> -\tweak before-line-breaking
> #(lambda (grob)
> (ly:grob-set-property! grob 'stencil
> (grob-interpret-markup grob "very long dynamic")))
> -#(make-music 'AbsoluteDynamicEvent)
> }
> seems to work.
> Not tested beyond this example, though.
>
> Best,
> Harm
________________________________
Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden