On Thu, 4 Apr 2019 at 11:28, Gianmaria Lari <[email protected]> wrote:
> Is this the correct way to create a function alias in lilypond or there is
> a shorter/better way?
>
> \version "2.21.0"
> extremelyLongNameFunction =
> #(define-music-function (music) (ly:music?)
> (let ((varOne #{ a b b a #}))
> #{
> $varOne $music $varOne
> #}))
>
> alias =
> #(define-music-function (music) (ly:music?)
> #{
> \extremelyLongNameFunction $music
> #})
>
> \alias {a}
>
> Thank you, g.
>
Apologies, in my previous mail before sending it I make a small change in
the code and didn't test it. So I introduced an error: "alias" is a
reserved word. So here it is the previous code corrected (I highlighted the
relevant change):
\version "2.21.0"
extremelyLongNameFunction =
#(define-music-function (music) (ly:music?)
(let ((varOne #{ a b b a #}))
#{
$varOne $music $varOne
#}))
short =
#(define-music-function (music) (ly:music?)
#{
\extremelyLongNameFunction $music
#})
\short {c c c c}
Best regards, g.
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user