Android, How to use microphone in order to calculate sound frequencies?

13,837

I'm also trying to do this. I haven't managed it myself yet, as I'm completely new to android development, but here are two useful links to the source code of other tuners, one in Java, one not:

EDIT: Thought I better link to the MANY alternatives on this site with people trying to make a guitar tuner.

RE-EDIT: FFT.java

Solved my problems. (Not linked properly because I'm a new user)

Share:
13,837
Hesam
Author by

Hesam

Do you want to know more about me, find me in LinkedIn

Updated on June 24, 2022

Comments

  • Hesam
    Hesam almost 2 years

    I'm working on Audio tuner application in order to tune musical instruments. User should play a note, then in my application I should show which frequency it has.

    The first, I should access to microphone?

    AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,
    sampleRate, AudioFormat.CHANNEL_IN_STEREO,
    AudioFormat.ENCODING_PCM_16BIT, bufferSize);
    

    Then I need to calculate frequency of sound. How can I do this?