Hi, I am currently working on an audio Wav file. I would like to check whether it is periodic and further extract the fundamental frequency of the file in Matlab. Does anyone knows the algorithm or codes to do that? Serene
Periodic?
Started by ●September 18, 2002
Reply by ●September 19, 20022002-09-19
Serene,
There is no inbuilt code as such in matlab for this purpose..
various codes might be available on the net. But u can even write
one of ur own and that's not much difficult.
The easiest method (algorithm!) to solve ur problem in matlab is
as follows:
- Read the wav file using 'wavread' command.
- Window it with some windowing function.. the best will be
'kaisar-bessel' window.
- zero-pad the vector to high enough value, say 1024, (if the size
of the file is small!) and take its fft.
- In the spectrum, go sample by sample and search for the peaks
(local maximas!). Make a peak-table of all such peaks in the first
half of spectrum (since the later half is mirror image of first).
Some elimination method can be used to remove small and spurious
peaks, popped up because of noise or side lobes.
- Do some statistical analysis on the difference between locations
of two adjacent (valid!) peaks. If this difference broadly (based
on some threshold!) comes out to be constant, then the signal is
periodic.
The above method is based on a simple principle that the spectrum
of a periodic signal is nothing but a train of impulses located on
equal frequency intervals (which is the multiple of fundamental
freq.).
This method will help for the second part of ur problem too... if
it turns out to be periodic then the fundamental frequency is
nothing but the statistical average of that difference between
adjacent peaks.
hope this helps.
regards,
Peeyush.
On Wed, 18 Sep 2002 lsl1510 wrote :
>Hi,
>I am currently working on an audio Wav file. I would like to
>check
>whether it is periodic and further extract the fundamental
>frequency
>of the file in Matlab. Does anyone knows the algorithm or codes
>to do
>that?
>Serene
>
>_____________________________________
>Note: If you do a simple "reply" with your email client, only the
>author of this message will receive your answer. You need to do
>a "reply all" if you want your answer to be distributed to the
>entire group.
>_____________________________________
>About this discussion group:
>To Join: audiodsp-subscribe@audi...
>To Post: audiodsp@audi...
>To Leave: audiodsp-unsubscribe@audi...
>Archives:
>http://groups.yahoo.com/group/audiodsp
>Other DSP-Related Groups:
>http://www.dsprelated.com
>>.
Reply by ●September 19, 20022002-09-19
Peeyush-
If Serene uses a window prior to FFT, then she should also use overlap in the
FFT,
normally 50%. Otherwise not all time domain samples are considered equally.
Jeff Brower
DSP sw/hw engineer
Signalogic
Peeyush wrote:
>
> Serene,
> There is no inbuilt code as such in matlab for this purpose..
> various codes might be available on the net. But u can even write
> one of ur own and that's not much difficult.
>
> The easiest method (algorithm!) to solve ur problem in matlab is
> as follows:
> - Read the wav file using 'wavread' command.
> - Window it with some windowing function.. the best will be
> 'kaisar-bessel' window.
> - zero-pad the vector to high enough value, say 1024, (if the size
> of the file is small!) and take its fft.
> - In the spectrum, go sample by sample and search for the peaks
> (local maximas!). Make a peak-table of all such peaks in the first
> half of spectrum (since the later half is mirror image of first).
> Some elimination method can be used to remove small and spurious
> peaks, popped up because of noise or side lobes.
> - Do some statistical analysis on the difference between locations
> of two adjacent (valid!) peaks. If this difference broadly (based
> on some threshold!) comes out to be constant, then the signal is
> periodic.
>
> The above method is based on a simple principle that the spectrum
> of a periodic signal is nothing but a train of impulses located on
> equal frequency intervals (which is the multiple of fundamental
> freq.).
>
> This method will help for the second part of ur problem too... if
> it turns out to be periodic then the fundamental frequency is
> nothing but the statistical average of that difference between
> adjacent peaks.
>
> hope this helps.
>
> regards,
> Peeyush.
>
> On Wed, 18 Sep 2002 lsl1510 wrote :
> >Hi,
> >I am currently working on an audio Wav file. I would like to
> >check
> >whether it is periodic and further extract the fundamental
> >frequency
> >of the file in Matlab. Does anyone knows the algorithm or codes
> >to do
> >that?
> >Serene
> >
> >_____________________________________
> >Note: If you do a simple "reply" with your email client, only
the
> >author of this message will receive your answer. You need to do
> >a "reply all" if you want your answer to be distributed to
the
> >entire group.
> >_____________________________________
> >About this discussion group:
> >To Join: audiodsp-subscribe@audi...
> >To Post: audiodsp@audi...
> >To Leave: audiodsp-unsubscribe@audi...
> >Archives:
> >http://groups.yahoo.com/group/audiodsp
> >Other DSP-Related Groups:
> >http://www.dsprelated.com
> >">http://docs.yahoo.com/info/terms/
Reply by ●September 19, 20022002-09-19
Hello Peeyush,
Can you please elaborate on
> This method will help for the second part of ur
problem too... if
> it turns out to be periodic then the fundamental frequency is
> nothing but the statistical average of that difference between
> adjacent peaks.
I don't follow the logic that fundamental frequency is the statistical
average of the difference between adjacent peaks.
Thanks in advance,
John
Reply by ●September 20, 20022002-09-20
Jeff,
Overlap of what in FFT ?? In his question, serene said that he
wants see if a wav file is periodic... I assumed that he wanted to
comment on periodicity of "complete" wav file and not individual
frames. So in the method i suggested, the whole wav file is taken
at a single go. The FFT gives the spectrum assuming the whole wav
file is quasi-stationary.
I agree that windowing of the time-signal distorts the spectrum,
but if u study what that distortion is, it is just that instead of
getting impulses in freq. domain (assuming signal is periodic!),
we get replicated 'window spectrum', with its central lobe exactly
at those freq. locations.. so if we do enough zero padding we can
get a decent enough resolution so as to resolve to neighbouring
peaks. And if that task is accomplished, the distortion doesn't
affect our analysis and we r through :-)
Btw, a digressing question, even if we would have considered
overlap in frames, I didn't get what u meant by overlap in FFT. As
far as I know, we always do overlap-add (the famous OLA!) in time
domain and that too at the time of final synthesis. Can u clarify
that !
regards,
Peeyush.
On Thu, 19 Sep 2002 Jeff Brower wrote :
>Peeyush-
>
>If Serene uses a window prior to FFT, then she should also use
>overlap in the FFT,
>normally 50%. Otherwise not all time domain samples are
>considered equally.
>
>Jeff Brower
>DSP sw/hw engineer
>Signalogic
>
>
>Peeyush wrote:
> >
> > Serene,
> > There is no inbuilt code as such in matlab for this
>purpose..
> > various codes might be available on the net. But u can even
>write
> > one of ur own and that's not much difficult.
> >
> > The easiest method (algorithm!) to solve ur problem in matlab
>is
> > as follows:
> > - Read the wav file using 'wavread' command.
> > - Window it with some windowing function.. the best will be
> > 'kaisar-bessel' window.
> > - zero-pad the vector to high enough value, say 1024, (if the
>size
> > of the file is small!) and take its fft.
> > - In the spectrum, go sample by sample and search for the
>peaks
> > (local maximas!). Make a peak-table of all such peaks in the
>first
> > half of spectrum (since the later half is mirror image of
>first).
> > Some elimination method can be used to remove small and
>spurious
> > peaks, popped up because of noise or side lobes.
> > - Do some statistical analysis on the difference between
>locations
> > of two adjacent (valid!) peaks. If this difference broadly
>(based
> > on some threshold!) comes out to be constant, then the signal
>is
> > periodic.
> >
> > The above method is based on a simple principle that the
>spectrum
> > of a periodic signal is nothing but a train of impulses
>located on
> > equal frequency intervals (which is the multiple of
>fundamental
> > freq.).
> >
> > This method will help for the second part of ur problem too...
>if
> > it turns out to be periodic then the fundamental frequency
>is
> > nothing but the statistical average of that difference
>between
> > adjacent peaks.
> >
> > hope this helps.
> >
> > regards,
> > Peeyush.
> >
> > On Wed, 18 Sep 2002 lsl1510 wrote :
> > >Hi,
> > >I am currently working on an audio Wav file. I would like
>to
> > >check
> > >whether it is periodic and further extract the fundamental
> > >frequency
> > >of the file in Matlab. Does anyone knows the algorithm or
>codes
> > >to do
> > >that?
> > >Serene
> > >
> > >_____________________________________
> > >Note: If you do a simple "reply" with your email client,
only
>the
> > >author of this message will receive your answer. You need to
>do
> > >a "reply all" if you want your answer to be distributed
to
>the
> > >entire group.
> > >_____________________________________
> > >About this discussion group:
> > >To Join: audiodsp-subscribe@audi...
> > >To Post: audiodsp@audi...
> > >To Leave: audiodsp-unsubscribe@audi...
> > >Archives:
> > >http://groups.yahoo.com/group/audiodsp
> > >Other DSP-Related Groups:
> > >http://www.dsprelated.com
> > >">http://docs.yahoo.com/info/terms/
Reply by ●September 20, 20022002-09-20
Peeyush-
FFT'ing the "whole file" is a power spectrum and irrelevant to
the discussion unless
the desired period of time analysis is known; as one example, 10-15 msec for
speech
data.
As for overlap on successive time domain frames, if you're unlucky and
arbitrarily
window each frame so the most important features that need to be analyzed are
always
at the beginning (or end) of a frame, then you will never see it -- regardless
of how
much zero-padding. 50% overlap with a Hanning window ensures that each time
domain
frame is treated equally at all points, and avoids arbitrary frame alignment
problems.
Distortion in the f domain is not the point; missing key information is the
point.
If you study it, you will see that if you shift a Hanning window by half and add
to
itself, you get a flat line = 1, something not always the case with other window
types.
Jeff Brower
DSP sw/hw engineer
Signalogic
Peeyush wrote:
>
> Jeff,
> Overlap of what in FFT ?? In his question, serene said that he
> wants see if a wav file is periodic... I assumed that he wanted to
> comment on periodicity of "complete" wav file and not individual
> frames. So in the method i suggested, the whole wav file is taken
> at a single go. The FFT gives the spectrum assuming the whole wav
> file is quasi-stationary.
>
> I agree that windowing of the time-signal distorts the spectrum,
> but if u study what that distortion is, it is just that instead of
> getting impulses in freq. domain (assuming signal is periodic!),
> we get replicated 'window spectrum', with its central lobe
exactly
> at those freq. locations.. so if we do enough zero padding we can
> get a decent enough resolution so as to resolve to neighbouring
> peaks. And if that task is accomplished, the distortion doesn't
> affect our analysis and we r through :-)
>
> Btw, a digressing question, even if we would have considered
> overlap in frames, I didn't get what u meant by overlap in FFT. As
> far as I know, we always do overlap-add (the famous OLA!) in time
> domain and that too at the time of final synthesis. Can u clarify
> that !
>
> regards,
> Peeyush.
>
> On Thu, 19 Sep 2002 Jeff Brower wrote :
> >Peeyush-
> >
> >If Serene uses a window prior to FFT, then she should also use
> >overlap in the FFT,
> >normally 50%. Otherwise not all time domain samples are
> >considered equally.
> >
> >Jeff Brower
> >DSP sw/hw engineer
> >Signalogic
> >
> >
> >Peeyush wrote:
> > >
> > > Serene,
> > > There is no inbuilt code as such in matlab for this
> >purpose..
> > > various codes might be available on the net. But u can even
> >write
> > > one of ur own and that's not much difficult.
> > >
> > > The easiest method (algorithm!) to solve ur problem in matlab
> >is
> > > as follows:
> > > - Read the wav file using 'wavread' command.
> > > - Window it with some windowing function.. the best will be
> > > 'kaisar-bessel' window.
> > > - zero-pad the vector to high enough value, say 1024, (if the
> >size
> > > of the file is small!) and take its fft.
> > > - In the spectrum, go sample by sample and search for the
> >peaks
> > > (local maximas!). Make a peak-table of all such peaks in the
> >first
> > > half of spectrum (since the later half is mirror image of
> >first).
> > > Some elimination method can be used to remove small and
> >spurious
> > > peaks, popped up because of noise or side lobes.
> > > - Do some statistical analysis on the difference between
> >locations
> > > of two adjacent (valid!) peaks. If this difference broadly
> >(based
> > > on some threshold!) comes out to be constant, then the signal
> >is
> > > periodic.
> > >
> > > The above method is based on a simple principle that the
> >spectrum
> > > of a periodic signal is nothing but a train of impulses
> >located on
> > > equal frequency intervals (which is the multiple of
> >fundamental
> > > freq.).
> > >
> > > This method will help for the second part of ur problem too...
> >if
> > > it turns out to be periodic then the fundamental frequency
> >is
> > > nothing but the statistical average of that difference
> >between
> > > adjacent peaks.
> > >
> > > hope this helps.
> > >
> > > regards,
> > > Peeyush.
> > >
> > > On Wed, 18 Sep 2002 lsl1510 wrote :
> > > >Hi,
> > > >I am currently working on an audio Wav file. I would like
> >to
> > > >check
> > > >whether it is periodic and further extract the fundamental
> > > >frequency
> > > >of the file in Matlab. Does anyone knows the algorithm or
> >codes
> > > >to do
> > > >that?
> > > >Serene
> > > >
> > > >_____________________________________
> > > >Note: If you do a simple "reply" with your email
client, only
> >the
> > > >author of this message will receive your answer. You need to
> >do
> > > >a "reply all" if you want your answer to be
distributed to
> >the
> > > >entire group.
> > > >_____________________________________
> > > >About this discussion group:
> > > >To Join: audiodsp-subscribe@audi...
> > > >To Post: audiodsp@audi...
> > > >To Leave: audiodsp-unsubscribe@audi...
> > > >Archives:
> > > >http://groups.yahoo.com/group/audiodsp
> > > >Other DSP-Related Groups:
> > > >http://www.dsprelated.com
> > > >">http://docs.yahoo.com/info/terms/
>
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the
author of this message will receive your answer. You need to do a "reply
all" if you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: audiodsp-subscribe@audi...
>
> To Post: audiodsp@audi...
>
> To Leave: audiodsp-unsubscribe@audi...
>
> Archives: http://groups.yahoo.com/group/audiodsp
>
> Other DSP-Related Groups: http://www.dsprelated.com
>
>
> ">http://docs.yahoo.com/info/terms/
Reply by ●September 20, 20022002-09-20
John-
I think Peeyush means between successive FFT frames. If you line the frames up
in a
3-D plot, with time on the z-axis, there may be some variation or
"jitter" in freq
position for a fundamental. Something like a running average over some number
of FFT
frames might help, especially if the running average length corresponds to some
"quasi-stationary" analysis period in the time domain.
Jeff Brower
DSP sw/hw engineer
Signalogic
John Lai wrote:
>
> Hello Peeyush,
> Can you please elaborate on
>
> > This method will help for the second part of ur problem too... if
> > it turns out to be periodic then the fundamental frequency is
> > nothing but the statistical average of that difference between
> > adjacent peaks.
>
> I don't follow the logic that fundamental frequency is the statistical
> average of the difference between adjacent peaks.
> Thanks in advance,
> John
Reply by ●September 23, 20022002-09-23
Jeff,
I think I am not able to make myself clear !
I never went to frames. I again repeat my words... We r 'not'
doing frame analysis here (i.e. 'not' analysing the time waveform
by breaking it into small frames of 10-15 msec).
The question here is just to find if a wav file is periodic or
not. When we do analyses frame by frame, we can comment on
periodicity for each frame as an individual entity. But since here
we have to comment on periodicity of the whole wav file as a
single entity, we take FFT of 'whole' wav file (and not of small
individual frames!). Question of 50% overlap etc. doesn't arise at
all.
John,
The logic behind my comment on the second part is as follows. When
a signal is periodic, it can be represented as a fourier series
and when u take its fourier transform, the spectrum contains
'only' a train of impulses. Now if the fundamental frequency of
the signal is f0, then the location of these impulses is f0, f1 2f0, f3 =
3f0,... and so on (i.e. fk = kf0).
So to calculate the fundamental frequency (f0) from this train of
impulses, take the difference of successive peaks, i.e.
(f1-f0),(f2-f1),(f3-f2)... (fk-f(k-1)). Since fk = kf0 =>
fk-f(k-1) = f0. So all the above differences will lead to
fundamental frequency f0. Theoritically u can take any of these
differences as f0 (fundamental freq.), but I asked u to take their
average (what i called as statistical average!) because, as the
resolution of the spectrum is limited, there might be little
variation in the location of these impulses. An average will give
u a better estimate.
Note that here there is 'no' averaging between 'frames' as
Jeff
interpreted.
regards,
Peeyush.
On Fri, 20 Sep 2002 Jeff Brower wrote :
>John-
>I think Peeyush means between successive FFT frames. If you line
>the frames up in a
>3-D plot, with time on the z-axis, there may be some variation or
>"jitter" in freq
>position for a fundamental. Something like a running average
>over some number of FFT
>frames might help, especially if the running average length
>corresponds to some
>"quasi-stationary" analysis period in the time domain.
>Jeff Brower
>DSP sw/hw engineer
>Signalogic
>John Lai wrote:
>>
>>Hello Peeyush,
>>Can you please elaborate on
>>
>> > This method will help for the second part of ur problem
>>too... if
>> > it turns out to be periodic then the fundamental frequency
>>is
>> > nothing but the statistical average of that difference
>>between
>> > adjacent peaks.
>>
>>I don't follow the logic that fundamental frequency is the
>>statistical
>>average of the difference between adjacent peaks.
>>Thanks in advance,
>>John
>
>var lrec_target="_top";
>var lrec_URL = new Array();
>lrec_URL[1]="http://rd.yahoo.com/M#3351.2287382.3722243.2225243/D=egroupweb/S05004726:HM/A34045/R=0/id=flashurl/*http://www.gotomypc.com/u/tr/yh/grp/300_mapF/g22lp?Target=mm/g22lp.tmpl";
>var
>lrec_flashfile="http://us.a1.yimg.com/us.yimg.com/a/1-/flash/expert_city/090302_lrec_map.swf";
>var
>lrec_altURL="http://rd.yahoo.com/M#3351.2287382.3722243.2225243/D=egroupweb/S05004726:HM/A34045/R=1/id=altimgurl/*http://www.gotomypc.com/u/tr/yh/grp/300_mapF/g22lp?Target=mm/g22lp.tmpl";
>var
>lrec_altimg="http://us.a1.yimg.com/us.yimg.com/a/1-/flash/expert_city/090302_lrec_map.gif";
>var lrec_width00;
>var lrec_height%0;
>
>_____________________________________
>Note: If you do a simple "reply" with your email client, only the
>author of this message will receive your answer. You need to do
>a "reply all" if you want your answer to be distributed to the
>entire group.
>_____________________________________
>About this discussion group:
>To Join: audiodsp-subscribe@audi...
>To Post: audiodsp@audi...
>To Leave: audiodsp-unsubscribe@audi...
>Archives:
>http://groups.yahoo.com/group/audiodsp
>Other DSP-Related Groups:
>http://www.dsprelated.com
>>.
Reply by ●September 23, 20022002-09-23
Hi Peeyush,
All your theory is correct. But it is usually not
practical to take FFT of a whole wave file. Divide and
conquer is best approach for whole files.
I forgot the original question. But the subject line
says periodic. Periodic signals are different from
harmonic. The peaks of periodic signals need not be
multiples of f0.
Navan
--- Peeyush <peeyush_kul@peey...> wrote:
>
> Jeff,
> I think I am not able to make myself clear !
> I never went to frames. I again repeat my words...
> We r 'not'
> doing frame analysis here (i.e. 'not' analysing the
> time waveform
> by breaking it into small frames of 10-15 msec).
> The question here is just to find if a wav file is
> periodic or
> not. When we do analyses frame by frame, we can
> comment on
> periodicity for each frame as an individual entity.
> But since here
> we have to comment on periodicity of the whole wav
> file as a
> single entity, we take FFT of 'whole' wav file (and
> not of small
> individual frames!). Question of 50% overlap etc.
> doesn't arise at
> all.
>
> John,
> The logic behind my comment on the second part is as
> follows. When
> a signal is periodic, it can be represented as a
> fourier series
> and when u take its fourier transform, the spectrum
> contains
> 'only' a train of impulses. Now if the fundamental
> frequency of
> the signal is f0, then the location of these
> impulses is f0, f1 > 2f0, f3 = 3f0,... and so on (i.e. fk = kf0).
> So to calculate the fundamental frequency (f0) from
> this train of
> impulses, take the difference of successive peaks,
> i.e.
> (f1-f0),(f2-f1),(f3-f2)... (fk-f(k-1)). Since fk > kf0 =>
> fk-f(k-1) = f0. So all the above differences will
> lead to
> fundamental frequency f0. Theoritically u can take
> any of these
> differences as f0 (fundamental freq.), but I asked u
> to take their
> average (what i called as statistical average!)
> because, as the
> resolution of the spectrum is limited, there might
> be little
> variation in the location of these impulses. An
> average will give
> u a better estimate.
>
> Note that here there is 'no' averaging between
> 'frames' as Jeff
> interpreted.
>
> regards,
> Peeyush.
>
>
> On Fri, 20 Sep 2002 Jeff Brower wrote :
> >John-
> >I think Peeyush means between successive FFT
> frames. If you line
> >the frames up in a
> >3-D plot, with time on the z-axis, there may be
> some variation or
> >"jitter" in freq
> >position for a fundamental. Something like a
> running average
> >over some number of FFT
> >frames might help, especially if the running
> average length
> >corresponds to some
> >"quasi-stationary" analysis period in the time
> domain.
> >Jeff Brower
> >DSP sw/hw engineer
> >Signalogic
> >John Lai wrote:
> >>
> >>Hello Peeyush,
> >>Can you please elaborate on
> >>
> >> > This method will help for the second part of ur
> problem
> >>too... if
> >> > it turns out to be periodic then the
> fundamental frequency
> >>is
> >> > nothing but the statistical average of that
> difference
> >>between
> >> > adjacent peaks.
> >>
> >>I don't follow the logic that fundamental
> frequency is the
> >>statistical
> >>average of the difference between adjacent peaks.
> >>Thanks in advance,
> >>John
> >
> >var lrec_target="_top";
> >var lrec_URL = new Array();
>
>lrec_URL[1]="http://rd.yahoo.com/M#3351.2287382.3722243.2225243/D=egroupweb/S05004726:HM/A34045/R=0/id=flashurl/*http://www.gotomypc.com/u/tr/yh/grp/300_mapF/g22lp?Target=mm/g22lp.tmpl";
> >var
>
>lrec_flashfile="http://us.a1.yimg.com/us.yimg.com/a/1-/flash/expert_city/090302_lrec_map.swf";
> >var
>
>lrec_altURL="http://rd.yahoo.com/M#3351.2287382.3722243.2225243/D=egroupweb/S05004726:HM/A34045/R=1/id=altimgurl/*http://www.gotomypc.com/u/tr/yh/grp/300_mapF/g22lp?Target=mm/g22lp.tmpl";
> >var
>
>lrec_altimg="http://us.a1.yimg.com/us.yimg.com/a/1-/flash/expert_city/090302_lrec_map.gif";
> >var lrec_width00;
> >var lrec_height%0;
> >
> >_____________________________________
> >Note: If you do a simple "reply" with your email
> client, only the
> >author of this message will receive your answer.
> You need to do
> >a "reply all" if you want your answer to be
> distributed to the
> >entire group.
> >_____________________________________
> >About this discussion group:
> >To Join: audiodsp-subscribe@audi...
> >To Post: audiodsp@audi...
> >To Leave: audiodsp-unsubscribe@audi...
> >Archives:
> >http://groups.yahoo.com/group/audiodsp
> >Other DSP-Related Groups:
> >http://www.dsprelated.com
> >">http://docs.yahoo.com/info/terms/
>
>
__________________________________________________
Reply by ●September 23, 20022002-09-23
Peeyush-
John is working on speech data, I recall from earlier posts that the application
was
audio conferencing, including a real-time implementation. He is using
frame-based
analysis as far as I know.
I'm not sure why you are discussing a file-based, or long-term
power-spectra based
approach, but I don't think it applies.
Jeff Brower
DSP sw/hw engineer
Signalogic
Peeyush wrote:
>
> Jeff,
> I think I am not able to make myself clear !
> I never went to frames. I again repeat my words... We r 'not'
> doing frame analysis here (i.e. 'not' analysing the time waveform
> by breaking it into small frames of 10-15 msec).
> The question here is just to find if a wav file is periodic or
> not. When we do analyses frame by frame, we can comment on
> periodicity for each frame as an individual entity. But since here
> we have to comment on periodicity of the whole wav file as a
> single entity, we take FFT of 'whole' wav file (and not of small
> individual frames!). Question of 50% overlap etc. doesn't arise at
> all.
>
> John,
> The logic behind my comment on the second part is as follows. When
> a signal is periodic, it can be represented as a fourier series
> and when u take its fourier transform, the spectrum contains
> 'only' a train of impulses. Now if the fundamental frequency of
> the signal is f0, then the location of these impulses is f0, f1 > 2f0,
f3 = 3f0,... and so on (i.e. fk = kf0).
> So to calculate the fundamental frequency (f0) from this train of
> impulses, take the difference of successive peaks, i.e.
> (f1-f0),(f2-f1),(f3-f2)... (fk-f(k-1)). Since fk = kf0 =>
> fk-f(k-1) = f0. So all the above differences will lead to
> fundamental frequency f0. Theoritically u can take any of these
> differences as f0 (fundamental freq.), but I asked u to take their
> average (what i called as statistical average!) because, as the
> resolution of the spectrum is limited, there might be little
> variation in the location of these impulses. An average will give
> u a better estimate.
>
> Note that here there is 'no' averaging between 'frames'
as Jeff
> interpreted.
>
> regards,
> Peeyush.
>
> On Fri, 20 Sep 2002 Jeff Brower wrote :
> >John-
> >I think Peeyush means between successive FFT frames. If you line
> >the frames up in a
> >3-D plot, with time on the z-axis, there may be some variation or
> >"jitter" in freq
> >position for a fundamental. Something like a running average
> >over some number of FFT
> >frames might help, especially if the running average length
> >corresponds to some
> >"quasi-stationary" analysis period in the time domain.
> >Jeff Brower
> >DSP sw/hw engineer
> >Signalogic
> >John Lai wrote:
> >>
> >>Hello Peeyush,
> >>Can you please elaborate on
> >>
> >> > This method will help for the second part of ur problem
> >>too... if
> >> > it turns out to be periodic then the fundamental frequency
> >>is
> >> > nothing but the statistical average of that difference
> >>between
> >> > adjacent peaks.
> >>
> >>I don't follow the logic that fundamental frequency is the
> >>statistical
> >>average of the difference between adjacent peaks.
> >>Thanks in advance,
> >>John






