[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme Problem
From: |
ian_hulin |
Subject: |
Re: Scheme Problem |
Date: |
Sun, 31 Dec 2006 06:25:18 -0800 (PST) |
Hi Brett,
Just a thought - the normal syntax for \repeat is
\repeat unfold 9 { <music statements> }
in your declaration you've put the keyword in quotes. Does it help if you
remove them? E.g.
--------------------------------------------
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
#})
--------------------------------------------
I don't know any of the Lilypond or Scheme internals but there's a chance
that this could be confusing a parser or lexical analyzer somewhere along
the line. Software diagnostic messages are sometimes just an opener for
negotiation...
Cheers,
Ian
Brett Duncan-2 wrote:
>
> 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
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
--
View this message in context:
http://www.nabble.com/Scheme-Problem-tf2900758.html#a8107195
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.