[CM] poly questions
James Hearon
j_hearon at hotmail.com
Tue Oct 26 10:40:43 PDT 2021
Hi,
Trying to get an understanding of all the interesting aspects of polywave in snd, and chebyshev polynomials, coefficients etc. I was trying to get a squarish wave from the coefficients but failing.
Also tried partials->polynomial, and normalize-partials with same result. Wondering what I'm misunderstanding about how you would employ the coefficients for a typical float-vector of partials, and amps for say a square wave?
(with-sound (:srate 48000 :channels 1 :play #t)
(let ((gen (make-polyshape 100.0 :coeffs (partials->polynomial (float-vector 1 1 3 .33 5 .2 7 .142 9 0.111)) ))
)
(do ((i 0 (+ i 1)))
((= i 88200))
(outa i (* .75 (polyshape gen 1.0 ))))))
Also, if I can ask more than one question per email, how do you go about using the generators:
mus-chebyshev-tu-sum x t-coeffs u-coeffs
mus-chebyshev-t-sum x t-coeffs
mus-chebyshev-u-sum x u-coeffs
I couldn't seem to locate an ex. for those, but I did see the c code in clm.c which is interesting.
Thank you,
Regards,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20211026/e9ebab85/attachment.html>
More information about the Cmdist
mailing list