This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
a happy user
- To: guile-user at gnu dot org
- Subject: a happy user
- From: Bill Schottstaedt <bil at ccrma dot stanford dot edu>
- Date: Sat, 30 Sep 2000 07:28:54 -0700
- List-Id: General Guile related discussions <guile-user.gnu.org>
I just wanted to say "Thank you!" to the guile
developers for optargs and generalized set! --
I have been slowly moving a large Common Lisp
program (with antecedents in MacLisp, not to
mention Fortran, SAIL, FAIL...) into Scheme
(Guile), and its main user-interface is a CL
macro essentially defined:
(defmacro with-sound ((&key (srate 22050) ...) &body body)
(let (...) ,.body))
so that a call looks like
(with-sound (:srate 44100) (fm-violin 0 1 440 .1))
and in Guile I got it to work as:
(defmacro with-sound (args . body)
`((lambda* (#:key (srate 22050)
(explode #f))
(let ((old-srate (mus-srate)))
(dynamic-wind
(lambda ()
(set! (mus-srate) srate))
(lambda ()
,@body)
(lambda ()
(set! (mus-srate) old-srate)))))
,@args))
I'm all smiles!
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user