I am looking for a simple (pseudo)code that spectrum-inverse a sampled audio signal.
Ideally C++
The code should support different sample rates (16/32/48KHz).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Mixing the signal by
Fs/2will swap high frequencies and low frequencies – think of rotating the spectrum around the unit circle by half a turn. You can achieve this rotation by multiplying every other sample by -1.Mixing by
Fs/2is equivalent to mixing byexp(j*pi*n). Ifxis the input andythe output,This simplifies easily because
sin(pi*n)is 0, andcos(pi*n)is alternating 1,-1.