0

im trying to detect frequency during recording in andrid

i follow those post and non of them give working code:

  1. Android app to record sound in real time and identify frequency

  2. android getting sound frequencies real time?

  3. http://www.anddev.org/novice-tutorials-f8/get-frequency-data-from-microphone-in-real-time-t16774.html

4.http://therandomlab.blogspot.co.il/2013/05/fft-audio-frequency-analysis-with.html

can anyone explain with working code - without guessing any var, how cat i get frequency in Hz in real time

Community
  • 1
  • 1
itzhar
  • 12,743
  • 6
  • 56
  • 63

1 Answers1

0

If you want to detect the frequency of a single sound (i.e. single guitar string, not a chord, or single voice), you can use the autocorrelation algorithm. I.e. to find shortest distance, where input signal correlates to itself.

I suggest you to read this article: https://gerrybeauregard.wordpress.com/2013/07/15/high-accuracy-monophonic-pitch-estimation-using-normalized-autocorrelation/

There is C++, but it can be easily ported to Java. You can also speed up that algorithm using FFT for autocorrelation and making certain optimizations.

AterLux
  • 4,566
  • 2
  • 10
  • 13