[chuck-users] overlap factor amplify input signal

Aylon Eduard eduard.aylon at gmail.com
Wed Nov 21 11:40:55 EST 2007


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 :-(.
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.

eduard


On Nov 21, 2007 4:36 PM, Aylon Eduard <eduard.aylon at gmail.com> wrote:

> 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();
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071121/73442750/attachment.htm 


More information about the chuck-users mailing list