FFT Spectral Denoiser Faust dsp
-
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 thisimport("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;
-
@treynterrio FAUST does FFT NOW!??! :O
-
@AxiomCrux No this FFT code can only work in a specialised "hacked" Faust IDE version that does FFT/iFF around the actual Faust DSP, using a social architecture, basically following the Max/MSP pfft model (https://docs.cycling74.com/legacy/max8/refpages/pfft~). This is not "official".
-
seems like it's a faustgen code only for running inside maxmsp.
Faust currently don't have any FFT functions for audio processing but since spectral denoiser doesn't need a complicated FFT structure so I think it'll be easy to be done in RNBO
-
Extract of Shihong Ren thesis "Creating an Online Platform and Tools for Real-Time Music Composition and Signal Processing"
3e5870ee-509c-4f16-880e-65c17ebfbee2-These_Shihong_REN-FFT.pdf These_Shihong_REN-FFT
-
@Allen I’ve done this in rnbo(it’s pretty straightforward) but it uses a ton of cpu especially if you try to add different fft sizes
-
@mmprod
Didn't expect that...
I thought the fft performance in rnbo is really bad but if it couldn't even handle a denoiser, it probably just isn't designed for audio processing purpose...