Hi there,<br><br>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?<br><br>thanks <br><br>eduard<br><br><br>SinOsc s => FFT fft => IFFT ifft => dac; //blackhole;<br>1024 => int fftsize => fft.size;<br>fftsize/4 => int hopsize;
<br>fftsize/2 => int specsize;<br>Windowing.blackmanHarris(fftsize) => fft.window => ifft.window;<br>complex spec[ specsize ];<br>fun void transform()<br>{<br> fft.upchuck();<br> fft.spectrum( spec );<br>
ifft.transform( spec );<br> hopsize::samp => now;<br>}<br><br>while( true )<br>{<br> if( Std.fabs(ifft.last() > 1) ) <br> <<< ifft.last() >>>;<br> transform();<br>}<br>