Gianmaria Lari <[email protected]> writes: > On Tue, 26 Jun 2018 at 10:47, David Kastrup <[email protected]> wrote: > >> Gianmaria Lari <[email protected]> writes: >> >> > For this I thought to write a substitution function etc. Something like >> > this (it doesn't compile): >> > >> > \version "2.19.81" >> > myScore = >> > #(define-void-function (music) (ly:music?) >> > (let (myRests #{ \time 3/4 r4 r r #} ) (ticktock #{ \time 3/4 hihat >> > bassdrum bassdrum #})) >> > #{ >> > \score { >> > << >> > \new Staff {\myRests $music} >> > \new DrumStaff { \ticktock} >> > >> >> > \layout{} \midi{} } #}) >> > >> > music = {\time 3/4 a b c'} >> > >> > \myScore \music >> > >> > The "let" part is not correct. I don't know how to define variable >> > containing lilypond code using let. >> >> How about copy&paste from working code then? >> >> The first argument of "let" is a list (parenthesized) of variable >> bindings. Each binding has the form (var value) so in general let >> _alyways_ starts (the exception being named let, but that's a different >> beast) >> >> (let (( >> >> and you are missing the second paren. Copying or imitating _any_ >> working let would have worked here. >> > > My apologies David and thank you for your help. > But I also wanted to know if the direction I have taken was correct or > completely wrong....
Well, it's a void function you use here, not a scheme function. Once it works, it will create a score and throw it away. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
