FFT window type
Feb 28, 2007 at 4:24am
FFT window typeHi, I’m using the Hann and Hamming windows for FFT processings. long fftFrameSize = pow(2, fftLog2n);
For the Blackman, I have: I’d like to test some other windows (like the Sine window) but I don’t find the algorithms. Does someone could bring me help? Best regards, 

Feb 28, 2007 at 10:00am
greetings phillepe, more like a c expression than a c++ one…unless you’re inquiring mWindow[k] = (double) .5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; whether this expression is valid granted in the class you’ve defined, http://en.wikipedia.org/wiki/Hann_window hann up in there (aka raised cos), which is what you’re attempting to invoke… hope that is helpful… brandon nickell. On 2/27/07, Philippe Gruchet > > Hi, > > I’m using the Hann and Hamming windows for FFT processings. > I have the following C++ code for the Cosine window (works fine!): > > long fftFrameSize = pow(2, fftLog2n); > switch(mWindowType) { > case WINDOW_COS: > for (long k = 0; k < fftFrameSize; k++) { > mWindow[k] = (double) .5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; > } > break; > > > For the Blackman, I have: > w(n) = 0.42 – 0.8 cos(2*Pi*n/N) + 0.08cos(4*Pi*n/N) > The window length L = N+1 > > > I’d like to test some other windows (like the Sine window) but I don’t find the algorithms. > > Does someone could bring me help? > A Max expression would be very cool. > A C code would be perfect. > And if you have a C++, it would be wonderful! > > Best regards, > Philippe > 

Feb 28, 2007 at 1:29pm
Hello Brandon, mWindow[k] = (double) .5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; This cosine window works very fine here in Xcode. > here’s a somewhat working list of windowing functions: I was looking for some other windows and this link to Wikipedia is great and very useful, thanks! < http://www.mathworks.com/access/helpdesk/help/toolbox/signal/f11708.html> And I found the sine window in the MaxMSP examples (!?): in [p windo] … As I can’t find it anywhere else, is it the right sine window for FFT too? Best, 

Mar 2, 2007 at 4:40am
Hi Phillipe, I looked at the example patch you’re referring to and see that the The Sine Window is best known for its use in mp3 compression but BTW, I noticed that your coefficient in the second term for the w(n) = 0.42 – 0.8 cos(2*Pi*n/N) + 0.08cos(4*Pi*n/N) should be: w(n) = 0.42 – 0.5 cos(2*Pi*n/N) + 0.08cos(4*Pi*n/N) Glad the reference to window types was helpful… Brandon Nickell On 2/28/07, Philippe Gruchet > > Hello Brandon, > > mWindow[k] = (double) .5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; > > This cosine window works very fine here in Xcode. > I already and successfully implemented the Hann and Hamming windows based on the Accelerate.framework. > > > here’s a somewhat working list of windowing functions: > > http://en.wikipedia.org/wiki/Hann_window > > I was looking for some other windows and this link to Wikipedia is great and very useful, thanks! > >From there, I just find what seems the original resource at the MathWorks website: > > < http://www.mathworks.com/access/helpdesk/help/toolbox/signal/f11708.html> > > And I found the sine window in the MaxMSP examples (!?): > > > in [p windo] … > [expr (1.1* (sin(($f1/1024. )* (2. * 3.1415926)))  .1)] > > As I can’t find it anywhere else, is it the right sine window for FFT too? > > Best, > Philippe > 

Mar 2, 2007 at 4:58pm
Hi Brandon, Thank you very much for your explanation about the sine window. > BTW, I noticed that your coefficient in the second term Yes, sorry. Just a typo by typing 8 instead of 5, just below ;) > Glad the reference to window types was helpful… Oh yes, thanks again! Kindest regards, 

Mar 7, 2007 at 10:58pm
> For the Blackman, I have: I finally found the doubleprecision Blackman window inside Xcode/vecLib.framework extern void Thanks again for the NONhelp about that :( 

Mar 7, 2007 at 11:07pm
I like the info at MathWorld: http://mathworld.wolfram.com/ApodizationFunction.html _Mark On Mar 7, 2007, at 2:58 PM, Philippe Gruchet wrote: > 

Jun 21, 2013 at 3:52am
I realise this is 6 years late but in case anyone in future has the same issue, pretty much ever frequently used windowing function can be found at : http://en.wikipedia.org/wiki/Window_function 
You must be logged in to reply to this topic.