Also, the final output gain depends on the type of window used. Would it be possible to have a normalisation parameter for windows? So ifft_output/overlap_factor/window_normalisation_param equals or aproximates the input signal gain. Not sure, but the normalisation parameter could be overcome by just normalising windows thus w[i]=Sum_[0, fftsize](w[i]). A previous email I sent a few days ago was also related to this, but I got no reply yet :-(.
<br>Instedad of having to do this manually, IMHO it'd be nice just to use ifft_output. In this way, one could set the overlap as fft.overlap( overlap_factor ) and the normalisation should be already set when the user sets the windowing into the fft, so when
windowing.blackmanHarris( size ) => fft.window is set. This way the user doesn't really need take care anymore.<br><br>eduard<br><br><br><div class="gmail_quote">On Nov 21, 2007 4:36 PM, Aylon Eduard <<a href="mailto:eduard.aylon@gmail.com">
eduard.aylon@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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>
</blockquote></div><br>