lilypond-user
[Top][All Lists]
Advanced

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

Scheme Problem


From: Brett Duncan
Subject: Scheme Problem
Date: Sun, 31 Dec 2006 15:23:05 +1100
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

The following function is an attempt on my part to learn how to create such functions, based on what appears in the User Manual. The function itself is not really important, just a problem I set for myself. It's supposed to take a number as its argument and produce the equivalent number of slashes, the idea being to use the slash as a comping symbol, and substituting the slash for the normal appearance of a quarter rest.

--------------------------------------------
compFor = #(define-music-function (parser location beats) (number?)
       #{
\override Rest #'stencil = #ly:percent-repeat-item-interface::beat-slash
           \override Rest #'thickness = #'0.48
           \override Rest #'slope = #'1.7
\repeat "unfold" $beats { r4 } \revert Rest #'stencil
       #})
--------------------------------------------

But when I put

   \compFor #16

into my .ly file, the following error occurs:

syntax error, unexpected NUMBER_IDENTIFIER, expecting DIGIT or UNSIGNED
           \repeat "unfold"
                                        \lilyvartmpb { r4 }


Can someone point out to me where I'm going wrong?

Thanks,

Brett

--
Brett Duncan
address@hidden

"Always do right - this will gratify some and astonish the rest."

Mark Twain




reply via email to

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