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