lilypond-user
[Top][All Lists]
Advanced

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

Re: nested variables in scheme


From: Rob Canning
Subject: Re: nested variables in scheme
Date: Thu, 16 Dec 2010 16:07:21 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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 ...

thanks

rob



reply via email to

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