Re: [Alsa-devel] DTMF recognition

2002-07-25 Thread Paul Davis

Hello to all,

who has already done DTMF recognition with ALSA ( OSS )?
I searched for examples in google, but I have found that
only in TODO lists ;-(.

Is this so difficult or why doesn't exist anything about that?

its a relatively trivial FFT problem. use FFTW to analyse the signal,
then look for two predominant frequencies, and check their values
against a table.

believe it or not, there are many, many things that have never been
written in the open source arena.

--p



---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] DTMF recognition

2002-07-25 Thread Joerg Mayer

On Thu, Jul 25, 2002 at 10:45:27AM -0400, Paul Davis wrote:
 who has already done DTMF recognition with ALSA ( OSS )?
 I searched for examples in google, but I have found that
 only in TODO lists ;-(.
 
 Is this so difficult or why doesn't exist anything about that?

Please have a look at the isdn4linux code, either the kernel or
one of the userland tools has very effective code to do that
(no fft iirc).

   Ciao
JÖrg
--
Joerg Mayer  [EMAIL PROTECTED]
I found out that pro means instead of (as in proconsul). Now I know
what proactive means.



---
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] DTMF recognition

2002-07-25 Thread Tony Hardie-Bick

 wouldn't it be easier to check for zerocrossings?

This would assume a perfect sine wave for both tones. The bad thing
about zero crossing is that even the tiniest amount of noise
completely ruins it, and then you're looking at second derivatives,
which are also dependent upon signal quality. The great thing about
dtmf, is you can find the signal even in truly bad cases.

An alternative to an fft is parallel resonant filters, but you cannot
then check non-dtmf frequencies to avoid false triggering. 

FFTW is the way to go.

Tony


---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] DTMF recognition

2002-07-25 Thread Mark Rages

On Thu, Jul 25, 2002 at 10:45:27AM -0400, Paul Davis wrote:
 Hello to all,
 
 who has already done DTMF recognition with ALSA ( OSS )?
 I searched for examples in google, but I have found that
 only in TODO lists ;-(.
 
 Is this so difficult or why doesn't exist anything about that?
 
 its a relatively trivial FFT problem. use FFTW to analyse the signal,
 then look for two predominant frequencies, and check their values
 against a table.
 

This is hardly an ALSA problem... linux-audio-devel maybe?

I have some Matlab/Octave code to do this. I wrote it for a DSP class.
I used the Goertzel algorithm. I could actually get pretty good rejection 
of false activation this way.

Email me if you want the code.

Regards,
Mark Rages
[EMAIL PROTECTED]





---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel



Re: [Alsa-devel] DTMF recognition

2002-07-25 Thread P. Christeas


  wouldn't it be easier to check for zerocrossings?

 This would assume a perfect sine wave for both tones. The bad thing
 about zero crossing is that even the tiniest amount of noise
 completely ruins it, and then you're looking at second derivatives,
 which are also dependent upon signal quality. The great thing about
 dtmf, is you can find the signal even in truly bad cases.

 An alternative to an fft is parallel resonant filters, but you cannot
 then check non-dtmf frequencies to avoid false triggering.

 FFTW is the way to go.

I'm an engineer and such a problem had been a standard case for our studies.
In DTMF, you only want to check for a specific set of frequencies.
Say you have a signal 'f(t)', where t is the time. A frequency (tone) is a 
signal in the form of 'sin(a*t)'. To detect that tone, you only need to check
g(t) = f(t) * sin(a*t)
this is what fft does, but fft will do that for a very wide range of 
frequencies. Read any engineering maths, and you may find a good way of 
checking a signal against some known frequency.
Don't rely on zerocrossings, phase difference may ruin the results. The 
correlation (that's its name; the multiplication I explained) stuff has 
amazingly good results..


---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel