title: Guitar tuner frequency
body: <p>I'm making a guitar tuner for iOS with <strong>Objective-C</strong>.Due to the fact I'm <strong>Beginner</strong> I'm struggling a bit to gather all the resources and information about it. I know the theory like ( correct me if I'm wrong ) :-</p>
  
  <ol>
  <li>First I need to get the input from microphone.</li>
  <li>Then need to apply apply <strong><em>FFT</em></strong> algorithm to get the frequency</li>
  <li>Then compare the <strong>frequency</strong> with the fundamental frequency of <strong>notes</strong>.</li>
  </ol>
  
  <p>while searching on stack and google I found people are talking a lot about <a href="https://github.com/youmingtaiziback/aurioTouch" rel="nofollow noreferrer"><strong>AurioTouch</strong></a> example soo I take a look at the example but however I'm not able to figure out what is exactly going on under the hood because the code is mostly return with C++ and pointer that I can't understand at least for now. I also found the <a href="https://github.com/syedhali/EZAudio/tree/master/EZAudioExamples/iOS/FFT" rel="nofollow noreferrer"><strong>EZAudio</strong></a> example ,and that was a great one seems to be working fine but according to my research the fundamental frequency of the guitar are measured as:-</p>
  
  <pre><code>String  Frequency   
  1 (E)   329.63 Hz
  2 (B)   246.94 Hz
  3 (G)   196.00 Hz
  4 (D)   146.83 Hz
  5 (A)   110.00 Hz
  6 (E)   82.41  Hz
  </code></pre>
  
  <p>and from EZAudioFFT example I'm getting the frequency:-</p>
  
  <pre><code>String  Frequency   
  1 (E)   333.02  Hz  
  2 (B)   247.60  Hz   
  3 (G)   398-193 Hz    (398 when start and 193 when end)
  4 (D)   290-150 Hz    (290 when start and 150 when end)
  5 (A)   333-215 Hz    (333 when start and 215 when end)
  6 (E)   247-161 Hz    (247 when start and 161 when end)
  </code></pre>
  
  <blockquote>
    <p>One thing to notice the <strong>EZAudioFFT</strong> example was showing the Max Frequency.</p>
  </blockquote>
  
  <p>So what I'm asking here is there anybody who have implemented this before
  and give me the direction and some detail information about the topic so In future nobody have to research more and more to gather all the resources.I need help with the following topics:-</p>
  
  <ol>
  <li><strong>What is the best possible way to get the accurate frequency of guitar string and the libraries to use</strong>.</li>
  <li><strong>Which type of frequency need to tune a guitar like maxFrequency, is there a role of altitude, magnitude</strong> <em>(i have less information about this topic)</em>.</li>
  <li><strong>What to do after getting the right frequency</strong>.</li>
  </ol>
  
  <p>Any help would be truly appreciated and my apologies in advance if i'm asking something stupid , it would be great if someone provide me information taking Objective-C as the primary language also I found this beautiful <a href="https://elsl.ooo/2016/02/12/digital-tuner-ios-swift.html" rel="nofollow noreferrer"><strong>Example</strong></a> but I was enable to implement it in Objective-C and was enable to compile amazing framework <a href="http://audiokit.io/" rel="nofollow noreferrer"><strong>AudioKit</strong></a> maybe due to Xcode 8.0 and some swift issues.</p>