Sign in

username:

password:



Not a member?

Search audiodsp



Search tips

Subscribe to audiodsp



audiodsp by Keywords

AAC | ADPCM | Convolution | DAFx | FFT | IIR | Mixer | MP3 | MPEG | MPEG-4

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Discussion Groups

Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).

  

Post a new Thread

Hanning Windowing - happ...@yahoo.com.sg - Dec 5 7:48:25 2007



Hi all, 

I would like to know how to apply the hanning window to an audio signal that is sampled at
16KHz?And how do we set the duration of the hanning window to be 20ms for the whole signal?

Thanks!!



(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: Hanning Windowing - Amit - Dec 7 7:35:37 2007

Hi,

Generate Hanning window with N = 320 from this wikipedia link. N = 320 will correspond to 20 ms
at 16 kHz. Frame your input signal with 320 samples in each frame. 2 consecutive input frames
should have an overlap of 50%(assuming you need this for a compression algo. Else, for any
other analysis, you could go for a higher percentage overlap, ofcourse with a different window
function).

Multiply Frame1, Frame2, ..  with the window to get the windowed signal.

Multiply Frame1, Frame2, ..  of the recieved signal with the same window. Overlap and add the
second half of Frame1 with first half of Frame2 to get 160 samples of the reconstructed
signal.. and so on and so forth for the rest of the frames. 

There is a book by Marina Bosi on Audio Coding which explains these concepts well.

Regards,
Amit

----- Original Message ----
From: "h...@yahoo.com.sg" <h...@yahoo.com.sg>
To: a...@yahoogroups.com
Sent: Wednesday, 5 December, 2007 1:27:16 PM
Subject: [audiodsp] Hanning Windowing

Hi all, 

I would like to know how to apply the hanning window to an audio signal that is sampled at
16KHz?And how do we set the duration of the hanning window to be 20ms for the whole signal?

Thanks!!



(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: Hanning Windowing - palm...@hotmail.com - Dec 7 7:43:21 2007

I supose that you're going to do a FFT, isn't it?
You have to buffer N samples of your signal and multiply each sample by a N samples of a
Hanning window: 

W(n)=0.5*(1-cos(2*pi*n/N-1)), n=0 to N-1

The number of samples will depend of number of lines of the FFT.
If you want a 1024 lines FFT, you have to buffer 2048 samples and multiply by a window with
2048 samples. (2048/16000 = 128ms).

It is convenient to do a zero padding, to reach a better resolution.

Regards

Hi all, 
>
>I would like to know how to apply the hanning window to an audio signal that is sampled at
16KHz?And how do we set the duration of the hanning window to be 20ms for the whole signal?
>
>Thanks!!



(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )

Re: Hanning Windowing - Peter Gien - Dec 18 20:24:36 2007

Here is how I coded up a Blackman window in C:
for(k=0;k<NFFT;++k)

{

    double w=0.42 - 0.5*cos(2*pi*k/(NFFT-1)) + 0.08*cos(4*pi*k/(NFFT-1));

    samples[k] *=w;

}

In this case the window fits over the signal that is NFFT samples long

On 12/6/07, Amit <a...@yahoo.co.uk> wrote:
>
>   Hi,
>
> Generate Hanning window with N = 320 from this wikipedia link. N = 320
> will correspond to 20 ms at 16 kHz. Frame your input signal with 320 samples
> in each frame. 2 consecutive input frames should have an overlap of
> 50%(assuming you need this for a compression algo. Else, for any other
> analysis, you could go for a higher percentage overlap, ofcourse with a
> different window function).
>
> Multiply Frame1, Frame2, .. with the window to get the windowed signal.
>
> Multiply Frame1, Frame2, .. of the recieved signal with the same window.
> Overlap and add the second half of Frame1 with first half of Frame2 to get
> 160 samples of the reconstructed signal.. and so on and so forth for the
> rest of the frames.
>
> There is a book by Marina Bosi on Audio Coding which explains these
> concepts well.
>
> Regards,
> Amit
>
> ----- Original Message ----
> From: "h...@yahoo.com.sg <happey_15%40yahoo.com.sg>" <
> h...@yahoo.com.sg <happey_15%40yahoo.com.sg>>
> To: a...@yahoogroups.com <audiodsp%40yahoogroups.com>
> Sent: Wednesday, 5 December, 2007 1:27:16 PM
> Subject: [audiodsp] Hanning Windowing
>
> Hi all,
>
> I would like to know how to apply the hanning window to an audio signal
> that is sampled at 16KHz?And how do we set the duration of the hanning
> window to be 20ms for the whole signal?
>
> Thanks!!
>



(You need to be a member of audiodsp -- send a blank email to audiodsp-subscribe@yahoogroups.com )