<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(with-sound (:srate 48000 :channels 1 :play #t)
<div> (let* ((dur 1.0)</div>
<div>(samps (seconds->samples dur))</div>
<div> (coeffs (partials->polynomial (float-vector 1 1 3 1/3 5 1/5 7 1/7 9 1/9) mus-chebyshev-second-kind))
</div>
<div> ;(coeffs (float-vector 1 1 3 1/3 5 1/5 7 1/7 9 1/9)) </div>
<div>;(coeffs #r(0.8349206349206351 0.0 -2.082539682539683 0.0 18.43809523809524 0.0 -40.63492063492063 0.0 28.44444444444444 0.0))</div>
<div>(x 0.0)</div>
<div>(incr (hz->radians 200.0))</div>
<div> )</div>
<div> (do ((i 0 (+ i 1)))</div>
<div>((= i samps))</div>
<div> (outa i (* 0.01 (mus-chebyshev-u-sum x coeffs)))</div>
<div> (set! x (+ x incr))</div>
)))</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jim<br>
</div>
</body>
</html>