lilypond-user
[Top][All Lists]
Advanced

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

Re: calculation in scheme


From: David Kastrup
Subject: Re: calculation in scheme
Date: Sat, 17 Sep 2011 18:52:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Neil Puttock <address@hidden> writes:

> On 17 September 2011 14:23, Stefan Thomas
> <address@hidden> wrote:
>> Dear community,
>> I would like to define a variable with sheme and I want to substract the
>> number one from this variable.
>> I tried it with:
>>
>>> % the following defines a Slur, lasting a certain number of eigth-notes
>>> xaS = #(define-music-function (parser location x) (number?)
>>>   #{ % in der folgenden Zeile Lilypondcode eingeben
>>>     s1*0 (  \repeat unfold  #(- $x 1)  {s8 } s8)
>>> #})
>>
>> Unfortunately without succes!
>
> This doesn't work since the unfold count argument isn't a scheme
> number.

In which case

xaS = #(define-music-function (parser location x) (number?) 
  #{ % in der folgenden Zeile Lilypondcode eingeben 
    s1*0 (  \repeat unfold  $(- x 1)  {s8 } s8) 
#})

should work just fine.  The slur has no noteheads to attach itself to,
though.
 
-- 
David Kastrup




reply via email to

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