lilypond-user
[Top][All Lists]

## Re: How to make a tweak a variable?

 From: Xavier Scheuer Subject: Re: How to make a tweak a variable? Date: Sun, 18 Sep 2011 00:40:47 +0200

```On 17 September 2011 23:58, harm6 <address@hidden> wrote:
>
> Hi Xavier,
>
> you can't put \tweak in variable.
>
> Try:
>
> crescTweak = #(let ((m (make-music 'CrescendoEvent
>                                   'span-direction -1)))
>        (set! (ly:music-property m 'tweaks)
>              (acons 'to-barline #f
>                     (ly:music-property m 'tweaks)))
>        m)
> {
>  c1 \crescTweak |  % it works
>  d4\!  % etc.
> }

Actually I do not want the grob to be "hardcoded" in the definition
of my variable.

I'd like to be able, for example, to define a variable
moveUp = -\tweak #'Y-offset #2
and to use it applied to different grobs:
c4\moveUp -"text"
c4\moveUp -\mordent

Is it really impossible?

Cheers,
Xavier

--

```