Hi there, I found a .pdf file with a Faust code for FFT spectral denoising and other spectral stuff I fixed a couple things in the code and can open it in the Faust WEB editor but I don't get any sound only a little sound at the beginning.
Maybe someone could check that and fix this
import("stdfaust.lib");
fftSize = hslider("fftSize", 1024, 2, 16384, 1);
bufferSize = fftSize / 2 + 1;
cartopol(x, y) = sqrt(x * x + y * y), atan2(y, x);
poltocar(r, theta) = r * cos(theta), r * sin(theta);
freezeBtn = checkbox("Capture");
reduceSld = hslider("Reduce", 0, 0, 2, 0.01);
freeze(rIn, iIn, bin) = out with {
freezeSignal(sig, frz) = orig + freezed with {
orig = sig * (1 - frz);
freezed = (orig : @(bufferSize)) + (orig * frz : @(bufferSize - 1)) * frz;
};
out = freezeSignal(rIn, freezeBtn), freezeSignal(iIn, freezeBtn);
};
fftproc(rIn, iIn, bin) = out with {
pol = cartopol(rIn, iIn);
mag = pol : _, !;
phase = pol : !, _;
pol_frozen = freeze(rIn, iIn, bin) : cartopol;
mag_frozen = pol_frozen : _, !;
phase_frozen = pol_frozen : !, _;
out = poltocar(max(mag * (1 - freezeBtn) + (mag - mag_frozen * reduceSld) * freezeBtn, 0), phase);
};
process = fftproc;