FFT and IFFT of audio signal

15 visualizaciones (últimos 30 días)
ANJANA KRISHNAN A
ANJANA KRISHNAN A el 7 de Mzo. de 2017
Comentada: Walter Roberson el 7 de Mzo. de 2017
I was trying to take FFT of an audio and then take IFFT to get the same audio.But i didn't get the entire audio.There wasn't any noise in the resultant audio after taking IFFT.The only problem is its clipped.
why this happens?
how can i resolve this problem?

Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de Mzo. de 2017
What does class() of the audio data show? If it is one of the integer classes like uint16, then the fft will be type double and the ifft of that would be type double, not the original data type. When you have data of type double that is outside of the range -1 to +1 then if you use one of the audio file writers then the data will be clipped.
If this is what is happening to you, that your original data is outside of the range -1 to +1 then you should convert your ifft results to that data class before writing it out. For, uint16(results)
  2 comentarios
ANJANA KRISHNAN A
ANJANA KRISHNAN A el 7 de Mzo. de 2017
thank you for your immediate answer.Actually i'm sorry...i made a mistake.
class of the audio data is double.it is a 222208x2 matrix whose values lie between -1 and +1.But after taking FFT the class becomes complex double,gives a 44100x2 matrix whose values are outside of the range -1 to +1.
while taking fft,i was calculating fs-point dft!!
[sig,fs]=wavread('base song.wav');
fsig1 = fft(sig,fs);
Y=real(ifft(fsig1));
I think that's where i went wrong.
Walter Roberson
Walter Roberson el 7 de Mzo. de 2017
Yes, fft(sig,fs) would often be wrong. If you had samples for more than 1 second, the fft would sort of summarize into one second; if you had fewer samples than 1 second, then fft would zero pad, which introduces a sinc signal effect in some situations.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by