Clamps Dictionary
with-fft-wrapper
Macro
(with-fft-wrapper (&key (size 1024) (hop-size 4) in proc) body)
A wrapper around a fft/ifft with windowed overlapping analysis frames.
Arguments
size |
Integer indicating fft size |
hop-size |
integer indicating number of overlapping fft frames. |
in |
input signal |
proc |
process applied between fft and ifft using abuf as locally bound symbol for the analysis buffer. |
body |
the body of a dsp calculated for every sample frame with (tick (ifft-output ifft)) being the output of the ifft. |
Example
(define-vug pv-lp-wall ((abuf abuffer) threshold) (dofft-polar (i nbins ((compute-abuffer abuf)) () :result abuf) (if (>= i (sample->fixnum threshold)) (setf mag0 0.0d0)))) (dsp! pv-lp-wall-test ( (size fixnum) (hop-size fixnum) amp) (:defaults 1024 4 0.1) (with-fft-wrapper (:in (buzz 440 0.5 30) :proc (pv-lp-wall abuf (lag (lin-mouse-x 0 d-nbins) .02))) (stereo (* amp (tick (ifft-output ifft)))))) (pv-lp-wall-test :head 200)