lilypond-user
[Top][All Lists]
Advanced

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

Re: nested variables in scheme


From: jakob lund
Subject: Re: nested variables in scheme
Date: Thu, 16 Dec 2010 16:21:55 +0100

2010/12/16 Rob Canning <address@hidden>:
> David Kastrup said :
>> address@hidden writes:
>>
>> > beza #0.4
>> >
>> > feeding into something like this: (which doesn't work)
>> >
>> > beza =  #(define-music-function (parser location thickness) (number?)
>> >    #{
>> > \bezier #'( 0.1  1.0 0.15  1.0 $number )
>> >  #})
>>
>> What happens if you write $thickness instead?
>
>
>
> here is a simplified version of the problem and the lilypond error:
>
> hpRot = #(define-music-function (parser location rot) (list?)
>          #{
>          \once \override Hairpin #'rotation = $rot
>          #})
>
> fooBar =  #(define-music-function (parser location zabadoo) (number?)
>            #{
>            { a b c d  \hpRot #'($zabadoo 0 1)  s2^\<  s s s \! }
>            #})
>
> \fooBar #3
>
>
> Drawing systems.../usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: 
> In
> procedure ly:system-print in expression (ly:system-print sys):
> /usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: Wrong type
> (expecting real number): lilyvartmpc
>
>
>
> from what i can guess the variable is not being evaluated but instead being
> passed as lilyvartmpc ...
>

in that case, try
try #(list $zabadoo 0 1) instead of #'($zabadoo 0 1)
... I havent tested it myself though...


> thanks
>
> rob
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>



reply via email to

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