Hi,

I'm getting confused on make-polyshape and partials->polynomial.

    re: sndclm manual
    partials->polynomial takes a list or float-vector of partial numbers and 
amplitudes and returns the Chebyshev polynomial coefficients that produce that 
spectrum. These coefficients can be passed to polyshape (the coeffs argument), 
or used directly by polynomial...

    ex.
    (partials->polynomial '(1 1 3 2 6 1))
    ;(-1.0 -5.0 18.0 8.0 -48.0 0.0 32.0)

    I'm trying to figure out how to use the coefficients, but I get an "attempt 
to apply a real -1.0, etc. error" when I plugin the float vector to the coeffs 
parameter.

    (with-sound ()
      (let ((gen (make-polyshape 400.0 :coeffs (-1.0 -5.0 18.0 8.0 -48.0 0.0 
32.0))))
        (do ((i 0 (+ i 1)))
            ((= i 88200))
          (outa i (* .5 (polyshape gen 0.25))))))

    How do you go about applying the partials->polynomial output to 
make-polyshape?  I couldn't seem to grep an example of that in the code.

    Thank you,
    Jim


_______________________________________________
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to