lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add a ticktock measure to the beginning of a score


From: David Kastrup
Subject: Re: add a ticktock measure to the beginning of a score
Date: Tue, 26 Jun 2018 12:03:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Gianmaria Lari <address@hidden> writes:

> On Tue, 26 Jun 2018 at 10:47, David Kastrup <address@hidden> wrote:
>
>> Gianmaria Lari <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]