lilypond-user
[Top][All Lists]
Advanced

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

Re: function for a certain number of barrests


From: Noeck
Subject: Re: function for a certain number of barrests
Date: Tue, 22 Jan 2013 11:32:32 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2


Am 22.01.2013 11:22, schrieb Stefan Thomas:
> Dear community,
> I wanted to create a function for a certain number of barrests.
> I've tried it with
> \version "2.16.2"
> \layout { \context { \Score  skipBars = ##t } }
> 
>     fourquarterBarrest = #(define-music-function (parser location x)
>     (number?)
>       #{ % in der folgenden Zeile Lilypondcode eingeben
>         \time 4/4 
>         \scaleDurations #(cons $x 1) { s1 }
>     #})
> 
> But this fails.
> Has someone an idea how to make it work?

Dear Stefan,

#(cons … ) is already scheme. There is no need for the $ in it:

fourquarterBarrest = #(define-music-function (parser location x) (number?)
  #{ % in der folgenden Zeile Lilypondcode eingeben
    \scaleDurations #(cons x 1) { s1 }
  #})

Two other questions:
1) Is it on purpose that you put the \time 4/4 in there?
2) What should the function do more than a simple s1*5?

Cheers,
Joram



reply via email to

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