lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme documentation and optional arguments


From: Paul Scott
Subject: Re: scheme documentation and optional arguments
Date: Sat, 31 Mar 2007 07:22:26 -0700
User-agent: Icedove 1.5.0.10 (X11/20070307)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nicolas Sceaux wrote:

>> The newer documentation on music functions 12.1 uses
>> define-music-function instead of define*  Where can I find documentation
>> to make the #:optional once? part above work with define-music-function
>> so I can write some more functions that I want?
> 
> There is not such thing as optional argument in music functions.
> You may do instead:
> 
> textPadding =
> #(define-music-function (parser location padding) (number?)
>    #{ \override TextScript #'padding = #$padding #})
> 
> textPaddingOnce =
> #(define-music-function (parser location padding) (number?)
>    #{ \once \override TextScript #'padding = #$padding #})
> 
> \textPadding #3
> ===
> \override TextScript #'padding = #3
> 
> \textPaddingOnce #3
> ===
> \once \override TextScript #'padding = #3


Thank you!

So I should have looked at music-functions,scm.  :)

Paul
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGDm6iVxeh4Z8mvCsRAriIAJ4jxnxgnOlbmoq50oWxukK81WeDnwCfddjU
YQ7RDCKpXYLYNXQIsgU7eXo=
=49lw
-----END PGP SIGNATURE-----




reply via email to

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