Hi Helge,

I want to save typing and it's tedious to write the complete tweak each
time. But the Y size must be adapted each time. Therefore a function is
necessary to change the current required value that is 6 in the example.

I've experimented with define-markup-command and define-music-function
by GUILE always outputs errors.
makeSpace = #(define-event-function (size) (number?)
               #{
                 -\tweak #'stencil #(ly:make-stencil '() '(0 . 0.1) `(0 . ,size) ) _""
               #}
               )

upper = \relative c'' {
    c1 \makeSpace 10
}

The two man points being:
- use define-event-function instead of define-music-function
- use a quasiquote ` instead of the quote ' for the pair (0 . [size]), since size must be evaluated, hence unquoted by a comma (,size).

Best
Lukas

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to