lilypond-user
[Top][All Lists]
Advanced

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

Re: Scheme variables and chordmode


From: Mats Bengtsson
Subject: Re: Scheme variables and chordmode
Date: Thu, 28 Feb 2008 11:05:41 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

Unfortunately, there are some limitations on what you can do, syntactically,
within a #{ ... #} construct and you have hit upon one of these limitations.
If you read section "Building complicated functions" in the manual, you will
see how to handle such cases using pure Scheme constructs.


   /Mats

Timothy S. Nelson wrote:
    Hi all.  I'm a programmer, but a scheme beginner.  I'm using the
following code.

------------------------------------------------------------

dostroke = #(define-music-function (parser location chord length) (ly:music? num
ber?)
        #{
                \chordmode { e,$length:5.8 }
        #}
)

------------------------------------------------------------

I presume you can all see what I'm trying to achieve here. However, I
can't get it to work, because it says "Parsing...ERROR: Unbound variable:
length:5.8". The other variations I've tried all also give errors. Is there some way I can do this using chordmode, or do I have to do it the long way?

    Thanks,


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: address@hidden    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----


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

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        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]