[CM] green, butter clm
j_hearon at hotmail.com
Fri Jun 6 18:13:39 PDT 2014
For CL/CLM manual under "other generators", I'm trying to understand the implications of green.cl and butterworth.cl.
"green.cl defines several special purpose noise generators.
butterworth.cl has several Butterworth filters.
(See analog-filter.scm in the Snd package for functions to design all the usual analog filters;
the output is compatible with CLM's filter generator)."
I think I've understood green.cl, but stuck on butterworth.cl, however I did get the Snd analog-filter.scm working in Grace and Snd.
For emacs/slime/lisp with butterworth.cl was trying below, but getting memory errors. Not sure if I understood what .cl is for? I just named it .lisp, added the instrument below to it and tried to compile and load that. I'm thinking I'm off on the wrong track about how the butterworths are intended to be utilized in clm.
(definstrument mybutter (beg dur freq amp)
(let* ((start (floor (* beg *srate*)))
(end (+ start (floor (* dur *srate*))))
(flt (make-butterbp 200 .5))
(os (make-oscil freq)))
(loop for i from start to end do
(outa i (* amp (filter flt (oscil os))))))))
(with-sound (:channels 2 :srate 48000 :header-type mus-riff :output "testbutter.wav")
(mybutter 0 5 400 .7)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cmdist