Discussion:
FFT Hanning window with .wav file
(too old to reply)
Neungruethai Nakkarit
2011-01-18 07:16:05 UTC
Permalink
I try fft hanning window from .wav file. Which .wav convert from .mp song.
it's cannot fft hanning window. Would like to requested kindly. With who knowledge to answer questions.

very thaks
Wayne King
2011-01-20 13:15:19 UTC
Permalink
Post by Neungruethai Nakkarit
I try fft hanning window from .wav file. Which .wav convert from .mp song.
it's cannot fft hanning window. Would like to requested kindly. With who knowledge to answer questions.
very thaks
Hi, I'm sorry but I am not sure I understand your question. Are you trying to take the Fourier transform of your input after multiplying by a Hamming window? If so, then

1.) Read your .wav file into the MATLAB workspace using wavread(). If the output is a two-column matrix, extract just one column.

Ex:
Y = wavread('yourfile.wav');
Y = Y(:,1);

2.) Multiply Y by a Hamming window of the same length.

Y =Y.*hamming(length(Y));

3.) Take the Fourier transform of Y
Ydft = fft(Y);

Alternatively, if you have the Signal Processing Toolbox, you can get a power spectral density estimate of Y using a Hamming window (if this is what you want) with:

plot(psd(spectrum.periodogram('Hamming'),Y,'Fs',Fs));

where Fs is the sampling frequency.

Hope that helps,
Wayne
Neungruethai Nakkarit
2011-01-20 13:59:05 UTC
Permalink
Very thaks . Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
hopping 200 sample /1 window which .wav length more long than window length.
I am cannot frame a data from .wav . I would like to take window along length of data.
please reply to me
very thank you.
Wayne King
2011-01-20 14:09:04 UTC
Permalink
Post by Neungruethai Nakkarit
Very thaks . Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
hopping 200 sample /1 window which .wav length more long than window length.
I am cannot frame a data from .wav . I would like to take window along length of data.
please reply to me
very thank you.
I apologize but I am having difficulty understanding you. I am understanding that you have a data vector which is 8291 samples in length and that you would like to window 200 sample segments of that data vector with a Hamming window and slide that window (hopping) along the data vector...??

I'm sure you understand your problem, but perhaps you have a colleague, who can help you express it perhaps a little clearer in English. Sorry.

Wayne
Neungruethai Nakkarit
2011-02-01 00:39:04 UTC
Permalink
Post by Wayne King
Post by Neungruethai Nakkarit
Very thaks . Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
hopping 200 sample /1 window which .wav length more long than window length.
I am cannot frame a data from .wav . I would like to take window along length of data.
please reply to me
very thank you.
I apologize but I am having difficulty understanding you. I am understanding that you have a data vector which is 8291 samples in length and that you would like to window 200 sample segments of that data vector with a Hamming window and slide that window (hopping) along the data vector...??
I'm sure you understand your problem, but perhaps you have a colleague, who can help you express it perhaps a little clearer in English. Sorry.
Wayne
In my project, I'm using the hanning window with the sample rate at 8291 and the hop is 200. but, I have some problem in the data which name is data.wav and Its period is very long.
Actually, I will seperate the hanning window with FFT type throughout the peroid of the my data.
How I can do it?

Neungruethai
Neungruethai Nakkarit
2011-02-01 00:57:03 UTC
Permalink
Post by Neungruethai Nakkarit
Post by Wayne King
Post by Neungruethai Nakkarit
Very thaks . Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
hopping 200 sample /1 window which .wav length more long than window length.
I am cannot frame a data from .wav . I would like to take window along length of data.
please reply to me
very thank you.
I apologize but I am having difficulty understanding you. I am understanding that you have a data vector which is 8291 samples in length and that you would like to window 200 sample segments of that data vector with a Hamming window and slide that window (hopping) along the data vector...??
I'm sure you understand your problem, but perhaps you have a colleague, who can help you express it perhaps a little clearer in English. Sorry.
Wayne
In my project, I'm using the hanning window with the sample rate at 8291 and the hop is 200. but, I have some problem in the data which name is data.wav and Its period is very long.
Actually, I will seperate the hanning window with FFT type throughout the peroid of the my data.
How I can do it?
Loading Image.../
Neungruethai
Wayne King
2011-02-01 16:15:05 UTC
Permalink
Post by Neungruethai Nakkarit
Post by Wayne King
Post by Neungruethai Nakkarit
Very thaks . Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
hopping 200 sample /1 window which .wav length more long than window length.
I am cannot frame a data from .wav . I would like to take window along length of data.
please reply to me
very thank you.
I apologize but I am having difficulty understanding you. I am understanding that you have a data vector which is 8291 samples in length and that you would like to window 200 sample segments of that data vector with a Hamming window and slide that window (hopping) along the data vector...??
I'm sure you understand your problem, but perhaps you have a colleague, who can help you express it perhaps a little clearer in English. Sorry.
Wayne
In my project, I'm using the hanning window with the sample rate at 8291 and the hop is 200. but, I have some problem in the data which name is data.wav and Its period is very long.
Actually, I will seperate the hanning window with FFT type throughout the peroid of the my data.
How I can do it?
http://img256.imageshack.us/i/soundk.jpg/
Neungruethai
Hi, Again, I apologize if we are not communicating clearly. It sounds to me like what you are trying to do is already implemented in spectrogram().

Read
Post by Neungruethai Nakkarit
doc spectrogram
You can specify the window length to be 200 and the segments are windowed by a Hamming window by default. The spectrogram computes the Fourier transform for overlapped segments of your data of the length you specify: 200 in your case apparently. You can specify the overlap to be what you want.

Wayne
Greg Heath
2011-02-01 16:02:25 UTC
Permalink
Post by Neungruethai Nakkarit
Post by Wayne King
Very thaks .  Waye,
I would like some help from you about
I use the length of hanning window has 8291 sample/1window
 hopping 200 sample /1 window which .wav length more  long than window length.  
I am cannot frame a  data from .wav .  I would like to take window along length of data.
please reply to me
very thank you.
I apologize but I am having difficulty understanding you. I am understanding that you have a data vector which is 8291 samples in length and that you would like to window 200 sample segments of that data vector with a Hamming window and slide that window (hopping) along the data vector...??
I'm sure you understand your problem, but perhaps you have a colleague, who can help you express it perhaps a little clearer in English. Sorry.
Wayne
In my project, I'm using the hanning window with the sample rate at 8291 and the hop is 200. but, I have some problem in the data which name is data.wav and Its period is very long.
Actually, I will seperate the hanning window with FFT type throughout the peroid of the my data.
How I can do it?
Neungruethai
I think Wayne's suggestion of having a friend
help you with the English is a very helpful
one.

Greg
HH Chen
2013-02-05 12:16:06 UTC
Permalink
Post by Wayne King
Post by Neungruethai Nakkarit
I try fft hanning window from .wav file. Which .wav convert from .mp song.
it's cannot fft hanning window. Would like to requested kindly. With who knowledge to answer questions.
very thaks
Hi, I'm sorry but I am not sure I understand your question. Are you trying to take the Fourier transform of your input after multiplying by a Hamming window? If so, then
1.) Read your .wav file into the MATLAB workspace using wavread(). If the output is a two-column matrix, extract just one column.
Y = wavread('yourfile.wav');
Y = Y(:,1);
2.) Multiply Y by a Hamming window of the same length.
Y =Y.*hamming(length(Y));
3.) Take the Fourier transform of Y
Ydft = fft(Y);
plot(psd(spectrum.periodogram('Hamming'),Y,'Fs',Fs));
where Fs is the sampling frequency.
Hope that helps,
Wayne
Hi Wayne!

Can you give me some advice on how to apply hanning window to vibration signals?
As I need to extract features in the frequency domain.

Loading...