Forum Navigation
You need to log in to create posts and topics.

Re: >>> Sound Routines #2

Posted by: bsanford <bsanford@...>

John Morrison wrote:
>Thanks Robert for the microphone function(s).
>Does anyone have any idea on how to evaluate the *frequency* of the
>sound input through the microphone?
>
As far as I know there are no routines in the Sound Manager to give you
this information. You must do it the hard way...

I would record into a buffer in ram and examine the buffer and see how
many times the samples cross the zero point for a given number of samples.
Frequency is just cycles per second... Knowing the sample rate, you could
determine the frequency.

I would probably record 0.25 seconds worth of samples and do my
calculation on that size buffer.

The sample rate you would use would depend on the highest frequency you
want to measure. The sample rate needs to be at a minimum of two times the
highest frequency.

Bill Sanford
Director of Engineering and Operations
--------------------------------------------
KAWE Ch-9 Bemidji - KAWB Ch-22 Brainerd
Public TV for Northern and Central Minnesota
** Visit our web site at http://www.nmptv.org **
--------------------------------------------
** Support Your Local Public TV Station!! **
--------------------------------------------