I am trying to calculate an actual frequency response from a desired frequency response.
fftSize = 128; fs = 8000;
I have 2 input arrays: f and aDesired, both of which are Real and length fftSize+1 (DC + Nyquist included). The f array is linearly spaced between 0 and fs/2 (0:4000). The aDesired array is either gains in dB or linear values.
I can easily change the length of f and aDesired as I have an interpolation function which gives any size outputs, but i thought this was a good number.
I would like to take an IFFT of ADesired to generate coefficients (with a configurable length), window and truncate the coeffs, and then FFT to show what the actual response would be, aActual.
How can I take an IFFT/FFT of this data when the inputs are both Real? Or how do I prepare the data more?
Finally, it doesnt matter about the phase, if its linear or not it doesnt matter.
Is there maybe a library that could be of use with my input data?
Input: f : linearly spaced fc's aDesired : Real values of linearly spaced gains at fc's (either in lin or log), Processing: coeffs = IFFT(f, aDesired) coeff_new Truncate(window * coeff) aActual = FFT(f, coeff_new) Output: aActual