2

i would like to create a guitar tuner in javascript but i don't know to to do it...

Once I recorded a 2 sec fragment audio file from the microphone, I would like for example what frequency is the note played in the recorded wav file !.

How to do it ? I've heard about FFT, but what is the main purpose of FFT ? Because when I edit an audio wav file un sublime text i obtain a thing like this: 0A12 4A3B etc...

Am I obliged to read this hexadecimal file or an algorithm detect frequency of a wav file ? Which one ? There is a tutorial ?

ErrorMan
  • 59
  • 2
  • 4
  • 1
    Take a look at [ask] and [help/on-topic] for an overview of the the sort of questions you can get help with on Stack Overflow. – pvg Apr 30 '17 at 17:42
  • Euh... In which website may I ask this question, so ? – ErrorMan Apr 30 '17 at 17:44
  • It's really a question where you're probably better off doing some initial research on your own, maybe finding some sample code. – pvg Apr 30 '17 at 17:45
  • Also use the StackOverflow search box as this question and many similar ones have already been asked and answered before. – Paul R Apr 30 '17 at 20:26
  • http://webaudiodemos.appspot.com/pitchdetect/ Is a nice demo using WebAudio and it's open source. It correlates the audio with a fixed set of sine waves (at specific frequencies) and reports the note with the highest correlation, rather than doing a full FFT. – Ahmed Fasih May 01 '17 at 11:35
  • If you want to make something like this specifically for music and don't know anything about it, well, I guess the skills required are first, learn web programming, second, implement one of the pitch estimation algorithms I showed in https://gist.github.com/fasiha/957035272009eb1c9eb370936a6af2eb – Ahmed Fasih May 01 '17 at 12:02
  • Does this answer your question? [How do i get the audio frequency from my mic using javascript?](https://stackoverflow.com/questions/69237143/how-do-i-get-the-audio-frequency-from-my-mic-using-javascript) – lmat - Reinstate Monica Nov 16 '22 at 11:41

1 Answers1

0

Look into this source code. And then make your own guitar tuner based on audio processing functions from that code.

Ilyich
  • 4,966
  • 3
  • 39
  • 27