[CM] mus-chebyshev-u-sum
James Hearon
j_hearon at hotmail.com
Fri Nov 5 10:59:39 PDT 2021
Hi,
I'm trying and failing to get my head around mus-chebyshev sums. For predictability I was trying to achieve the square wave output but getting hung up. The manual says mus-chebyshev-tu-sum and friends perform the same function as partials->polynomial, but it takes a coeffs vector too, so I'm confused about how you would perform additive synthesis (as square wave) with it?
I get the parts about phase, and ability to set individual partial amps etc., but can't quite figure what coeffs needs. My three tries for the coeffs vector don't seem to work. I guess I'm thinking phase and amps are not all that critical as long as the coeffs are correct, but I could be wrong. But maybe it's the other way round where you can only do it thru phase and amps and the coeffs are not that critical.
(with-sound (:srate 48000 :channels 1 :play #t)
(let* ((dur 1.0)
(samps (seconds->samples dur))
(coeffs (partials->polynomial (float-vector 1 1 3 1/3 5 1/5 7 1/7 9 1/9) mus-chebyshev-second-kind))
;(coeffs (float-vector 1 1 3 1/3 5 1/5 7 1/7 9 1/9))
;(coeffs #r(0.8349206349206351 0.0 -2.082539682539683 0.0 18.43809523809524 0.0 -40.63492063492063 0.0 28.44444444444444 0.0))
(x 0.0)
(incr (hz->radians 200.0))
)
(do ((i 0 (+ i 1)))
((= i samps))
(outa i (* 0.01 (mus-chebyshev-u-sum x coeffs)))
(set! x (+ x incr))
)))
Thank you,
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20211105/5d26c404/attachment.html>
More information about the Cmdist
mailing list