On Tue, 26 Jun 2018 at 10:47, David Kastrup <d...@gnu.org> wrote:

> Gianmaria Lari <gianmarial...@gmail.com> 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....
g.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to