i would like to add even harmonics from the data of FFT of a signal.

How do i do that ? do i have to search for higher magnitude frequencies then add the $2f$ then $4f$ etc ?

I understand how to do it from a sin wave for example but not from a noisier signal.


1 Answer 1


For each added harmonic, for each bin number below N/2, you could divide by the harmonic ratio, then use that resulting number to interpolate a point below in the FFT, unless the division results in an integer, in which case you could just use the value from a lower FFT bin. Use a high-quality interpolator, such as a windowed Sinc or other polyphase upsampling filter kernel. For a strictly real result from an IFFT, make sure the values above N/2 in your harmonic frequency synthesis remain conjugate symmetric with those below N/2.

  • $\begingroup$ but how to choose which frequency to hamonize ? $\endgroup$
    – ion_one
    Aug 24, 2013 at 14:07
  • $\begingroup$ All of them? (Every FFT bin is a potential harmonic of something below.). Or use a pitch detection/estimation algorithm (search here for many) for just one fundamental pitch and it's existing harmonics to use for the below content. $\endgroup$
    – hotpaw2
    Aug 24, 2013 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.