Hi there,

In the following code ifft.last() is sometimes larger than 1, but when the input signal has unity gain, it shouldn't be like this. Actually, what happens, I think, is that the amplification is proportional to the overlap factor. So should setting ifft.gain to hopsize/fftsize be the correct way to handle this?

thanks

eduard


SinOsc s => FFT fft => IFFT ifft => dac; //blackhole;
1024 => int fftsize => fft.size;
fftsize/4 => int hopsize;
fftsize/2 => int specsize;
Windowing.blackmanHarris(fftsize) => fft.window => ifft.window;
complex spec[ specsize ];
fun void transform()
{
    fft.upchuck();
    fft.spectrum( spec );
    ifft.transform( spec );
    hopsize::samp => now;
}

while( true )
{
    if( Std.fabs(ifft.last() > 1) )
        <<< ifft.last() >>>;
    transform();
}