<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.&nbsp; For predictability I was trying to achieve the square wave output but getting hung up.&nbsp; The manual says mus-chebyshev-tu-sum and friends perform the same function as partials-&gt;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.&nbsp; My three tries for the coeffs vector don't seem to work.&nbsp; 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.&nbsp; 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>&nbsp; (let* ((dur 1.0)</div>
<div>(samps (seconds-&gt;samples dur))</div>
<div>&nbsp;(coeffs (partials-&gt;polynomial (float-vector 1 1 3 1/3 5 1/5 7 1/7 9 1/9) &nbsp;mus-chebyshev-second-kind))
</div>
<div>&nbsp;;(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-&gt;radians 200.0))</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)</div>
<div>&nbsp; &nbsp; (do ((i 0 (+ i 1)))</div>
<div>((= i samps))</div>
<div>&nbsp; &nbsp; &nbsp; (outa i (* 0.01 (mus-chebyshev-u-sum x coeffs)))</div>
<div>&nbsp; &nbsp; &nbsp; (set! x (+ x incr))</div>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)))</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>