From: Rick Lyons on
On Fri, 26 Mar 2010 19:46:26 -0700 (PDT), "Ron N."
<rhnlogic(a)yahoo.com> wrote:

>On Feb 27, 1:10�pm, karthikbalaguru <karthikbalagur...(a)gmail.com>
>wrote:
>> Hi,
>>
>> I am looking for an open source implementation
>> for decoding DTMF signals using Goertzl Algorithm
>> in C language. I searched the internet, but did not
>> get an open source implementation in C language.
>
>Note that there is a difference between just using
>a Goertzel filter, and decoding DTMF. For decoding,
>there needs to be a decision criteria, so you might
>want to do a running estimate the average signal
>power and the noise floor and use those as part of
>your decision criteria.
>
>Also, a Goertzel filter is similar to a 1-bin DFT. And
>thus if the frequency of interest, or any other strong
>frequencies present, are non-periodic in the length
>of the filter, then you may get "leakage artifacts".
>You might be able to minimize these "artifacts" by
>pre-windowing the data.
>
>Somewhere on my website is an explanation of
>this 1-bin DFT/Goertzel "leakage":
> http://www.nicholson.com/rhn/dsp.html
>
>IMHO. YMMV.

Hi Ron
It's the "Frequency Response of Zero-padded FFT/DFT"
section of your web page. By the way, I thnk your
"Common FFT Usage Misconceptions" material is interesting.

See Ya',
[-Rick-]

From: Vladimir Vassilevsky on


Rick Lyons wrote:

> On Fri, 26 Mar 2010 19:46:26 -0700 (PDT), "Ron N."
> <rhnlogic(a)yahoo.com> wrote:
>>Somewhere on my website is an explanation of
>>this 1-bin DFT/Goertzel "leakage":
>> http://www.nicholson.com/rhn/dsp.html
>>
> It's the "Frequency Response of Zero-padded FFT/DFT"
> section of your web page. By the way, I thnk your
> "Common FFT Usage Misconceptions" material is interesting.

The most common FFT misconception is the one with is scaling of the FFT
results. It had been 1000 times when I had to explain them that they
can't compare 512pt FFT to 4096pt FFT directly; people just don't seem
to understand that. It is also very common to see a spectral plot
without any reference to the bin width.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com




From: Mark on
Thad Smith wrote:
>>> ...
>>> It worked after adding the following line:
>>> #define PI 3.14159265358979
>>>
>>> PI is not defined by the either of the standard headers.
>>>
>>
>> Did you try M_PI?
>
> That's not defined by a Standard C header, either. Either one of
> those might be defined in a non-conforming compiler, but not Standard
> C.
So the C standard leaves PI defintion, as well as other constants (for
example, log2e, log10e) to implementation?

--
Mark

From: John Devereux on
Thad Smith <ThadSmith(a)acm.org> writes:

> 2G wrote:
>> On Feb 27, 12:10 pm, karthikbalaguru <karthikbalagur...(a)gmail.com>
>> wrote:
>>> Hi,
>>>
>>> I am looking for an open source implementation
>>> for decoding DTMF signals using Goertzl Algorithm
>>> in C language. I searched the internet, but did not
>>> get an open source implementation in C language.
>>> I searched the internet and landed in the below link,
>>> but the 'Listing 1' as mentioned in the contents of
>>> the below link does not seem to work -http://www.embedded.com/story/OEG20020819S0057
>>> Any other links/open source implementation ?
> ...
>> It worked for me. Here is Listing 1:
>>
>> Listing 1 A Goertzel implementation
>>
>> #include <stdio.h>
>> #include <math.h>
>>
> ...
> It worked after adding the following line:
> #define PI 3.14159265358979
>
> PI is not defined by the either of the standard headers.

Best use

#include <math.h>
double pi = acos(-1);

This will continue to work even if the value of pi changes in the
future.

--

John Devereux
From: Ron N. on
On Mar 28, 5:14 am, Vladimir Vassilevsky <nos...(a)nowhere.com> wrote:
> Rick Lyons wrote:
> > On Fri, 26 Mar 2010 19:46:26 -0700 (PDT), "Ron N."
> > <rhnlo...(a)yahoo.com> wrote:
> >>Somewhere on my website is an explanation of
> >>this 1-bin DFT/Goertzel "leakage":
> >>http://www.nicholson.com/rhn/dsp.html
>
> > It's the "Frequency Response of Zero-padded FFT/DFT"
> > section of your web page.  By the way, I thnk your
> > "Common FFT Usage Misconceptions" material is interesting.
>
> The most common FFT misconception is the one with is scaling of the FFT
> results. It had been 1000 times when I had to explain them that they
> can't compare 512pt FFT to 4096pt FFT directly; people just don't seem
> to understand that.

I would believe there could be confusion about that. What do you find
to be the most common area of misconception? The frequency
represented by a particular bin number? The bin "width"? Something
about the time/resolution trade-off when changing the number of
points?

I'll add that to my list.


--
rhn A.T nicholson d.0.t C-o-M