lilypond-user
[Top][All Lists]
Advanced

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

Re: Using Scheme


From: Mats Bengtsson
Subject: Re: Using Scheme
Date: Fri, 12 May 2006 16:20:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3

Nicolas recently answered a closely related question.
One solution should be to replace
#'($beg . $end)
by
(cons $beg $end)

  /Mats

Trent Johnston wrote:

Sorry I should have been a bit more specific before...

I tried using

manBeam = #(define-music-function (parser location beg end) (number?
number?)
#{ \once \override Beam #'positions = #'($beg . $end) #} )

but whenever I try to use it

\manBeam #6 #6  --- I get or any other possible combinations

"ERROR: Wrong type (expecting real number): lilyvartmpb"

From what I can piece together from the documentation and the user-list I
think there is something more I need to do.. but can't figure that out.

Trent

----- Original Message ----- From: "Paul Scott" <address@hidden>
To: "Trent Johnston" <address@hidden>
Cc: <address@hidden>
Sent: Friday, May 12, 2006 7:23 PM
Subject: Re: Using Scheme


| Trent Johnston wrote:
| > Thanks for your help Paul, but I was actually looking at Beam settings
| >
| > a way to simplify \once \override Beam #'positions = #'( number .
number )
| >
| I understood that.
| > I used the padText as an example but couldn't get it to work with the
above
| > example...
| >
| I didn't have a quick application like yours to test since haven't used
| beam settings but I was just trying to help you understand how variables
| work so you could create your 'posBeam' (or whatever you want to call
| it) definition from the padText example.
|
| A quick attempt (completely untested) would be
|
|      posBeam = #(define-music-function (parser location num1 num2)
(number? number?)
|      #{
|        \once \override Beam #'position = #'( $num1 . $num2 )
|      #})
|
| Without testing I don't know whether you would apply it as:
|
| \posBeam #3 #2
| or
| \posBeam ( #3 . #2 )
| or something different.
|
| Paul
|
|


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


--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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