Android Question Help with Audio Frequency

Beja

Expert
Licensed User
Longtime User
Hi all,

I want to listen to the mic and then display the audio frequency in an EditTextBox..
Any hint appreciated.
 

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
Take a look at the example I uploaded to "Share Your Creations" sub-forum about a month ago. It's called "FFT Test".

If you want to look at the frequency of audio captured by the microphone, you'll probably end up doing something like:
1) Acquire audio records from the microphone.
2) Perform an FFT and square root of the magnitude squared to obtain the "spectral power" of the audio.
3) The "spectral power" of the most abundant frequency will be represented by the "bin" with the largest value. Each bin represents the frequency range of the Nyquist frequency divided by the number of bins.

My example uses a 64 point FFT, but I have also used this example to do a 256 point FFT.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You may also have a look at the FFT_Record.zip B4A program in the B4X FFT Class thread.

I want to listen to the mic and then display the audio frequency in an EditTextBox.
Depending on the sound, you might have several frequency peaks.

You might also have a look at this BeepTest project, it's similar to the FFT_Record project, but with peak detection.
 
Last edited:
Upvote 0

Beja

Expert
Licensed User
Longtime User
The problem I have is not recognizing or comparing against a table..etc. But to display the frequency (AS IS) on a texteditbox view.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
I suggested could lead you in the right direction.

It did.. This is what I was looking for exactly (the frequency)
thank Klaus
FFT86.png
 
Upvote 0
Top