Q:

Why square-root of Hanning Window

I just studied an implementation (Matlab) of a windowed FFT and saw the following line of code:
w = sqrt(hann(fft_length, 'periodic'))

and later:
spectogram(:, column) = fft(ringbuffer.*w, fft_length) %why .*w ? 

The ringbuffer obviously contains the current frame of the signal and the overlap so its's obvious to me that this needs to be multiplied with the Hanning Window  but why is the square-root being taken first? 

A:

The purists will tell you it should be called a Hann window, or VonHann, but not Hanning.
From a math perspective, the Hann window is also equivalent to a sine squared window at half the frequency, so by taking the square root you are getting a sine window.
Why use a window at all?  The seminal paper on the topic is: 
harris, fred. (Jan 1978). "On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform"
A link to the paper can be found in reference [10] of the Wikipedia article on windows.
Hope this helps.
Ced

