I'm just learning CLM and seek advice. First some background, I have
years of experience with Nyquist and thus XLISP, not so much with
Common Lisp.  With Nyquist I have striven to write reusable code
whenever possible.  As an exercise I have attempted to write a
reusable delayed onset LFO in CLM.  The resulting code is in the
attachment.  I have also attached code for common envelope contours.
A few "utility" functions are defined outside of these files but have
fairly obvious use.

A few questions:
1) XLISP does not have a package system and I'm still a little unsure
how packages work. In envutil.lisp I have defined the envutil package.
For such simple code would it be better to simply use the CLM package?
 In dlfo I have to explicitly call envutil:dasr.  Is there any way to
"expose" dasr such that I no longer need the package prefix?

2) In Nyquist I would have defined dlfo as a function. After some
experiments I defined two functions for CLM, one to create the lfo and
associated envelope objects, the other (actually a macro) to combine
these two objects within an instrument body. Is this a typical
approach with CLM?

3) So far the test instruments I have defined have a duration argument
but no start time argument. The start time defaults to 0 within the
instrument definition. Once I get into scoring compositions would this
lack of explicit start time come back to haunt me?

Thanks much in advance
Steven Jones

Attachment: envutil.lisp
Description: Binary data

Attachment: dlfo.lisp
Description: Binary data

Reply via email to