lilypond-devel
[Top][All Lists]
Advanced

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

Re: Adjusting `\f`


From: Werner LEMBERG
Subject: Re: Adjusting `\f`
Date: Fri, 19 Jan 2024 05:52:59 +0000 (UTC)

> I would like to change the definition of `\f` to something like this
>
> ```tex
> "f" = #(make-music 'AbsoluteDynamicEvent
>                    'text "f"
>                    'tweaks '(((DynamicLineSpanner . horizon-padding) . 0.1)))
>
> { \stemDown f'4\f f'4\p }
> ```
>
> to handle issue #4159.
>
> However, if I do the above the `horizon-padding` property can no
> longer be overridden with `\tweak` or `\override`.  How can I fix
> that?  In other words, I would like to set the `horizon-padding`
> property for `\f` as if I provided a default value for the
> `DynamicLineSpanner` grob in `define-grobs.scm`.

After some more thinking I couldn't find a solution to this problem.
Any ideas?

I thought about adding a new event property parallel to `tweaks`, say,
`defaults`, that works exactly in the same way but only sets a given
grob property if `tweaks` doesn't contain it.  I could then say

```
"f" = #(make-music 'AbsoluteDynamicEvent
                   'text "f"
                   'defaults '(((DynamicLineSpanner . horizon-padding) . 0.1)))

{ \stemDown \tweak DynamicLineSpanner.horizon-padding 0 f'4\f f'4\p }
```

successfully, but calling `\once\override
DynamicLineSpanner.horizon-padding = 0` would still not work.

I could further restrict `defaults` so that it would only be used if a
property is not set at all, neither in `define-grobs.scm`, nor via
`tweaks` or `\override`.  I'm not sure, however, whether this makes
sense in the long run, i.e., whether this is just an ad-hoc solution
to this particular problem, or whether there are more situations that
would benefit from such a feature.


    Werner



reply via email to

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