title: How to "zero-phase-adjust" DFT output?
body: <p>I understand the complex output of a DFT contains both "amplitude" and "phase" information at discrete frequencies.</p>
  
  <pre><code>Amplitude[n] = sqrt((r[n]*r[n]) + (i[n]*i[n]))
  Phase[n] = (atan2(i[n],r[n]))
  Frequency[n] = n * (sample_rate / (fft_input_length / 2))
  </code></pre>
  
  <p>It seems that I should be able to use the frequency, amplitude, and phase information to calculate the amplitude of each output bin as if the input at the corresponding frequency had a zero-phase alignment in the FFT input. But I am drawing a blank.</p>
  
  <hr>
  
  <p>Hmm, digging deeper into my problem I discovered that the imaginary potion of the FFT output is always 0.0 regardless of the input. So I am guessing my code is flawed or the algorithm is not what I need.</p>