Apply FFT to a both channels of a stereo signal separately?

人盡茶涼 提交于 2020-01-13 18:10:12

问题


I'm reading a wave-file and would like to apply the fast fourier transformation to it. However I've got a stereo signal and I'm wondering what to do with the left and right channel. Does the FFT need to be applied to both channels separately?


回答1:


Yes and no.

Certainly the FFT of each channel is independent, so you want separate FFTs for each of them.

However, it is possible to compute two FFTs of real data using one call to a routine for FFTs of complex data and some additional arithmetic. This is described in Numerical Recipes and here. One real signal is used as the real part of a complex signal, and the second real signal is used as the imaginary part. Their transforms can be separated in the result with the additional arithmetic.

This works because the FFT is a linear operation, so the real and imaginary parts of the transform are separable in a sense, and the symmetry in a real-to-complex FFT makes that separation relatively simple.

FFT routines in published libraries are typically highly optimized. Unless the code for the additional arithmetic is also well optimized, it may be faster to make two calls to a real-to-complex FFT routine than to make one call to a complex-to-complex FFT routine supplemented with your own implementation of the additional arithmetic.

A common use of FFTs is to transform a signal, multiply by the transform of a real impulse-reaponse filter, and perform the inverse transform. In this case, it is not necessary to separate the two signals; the multiplication may be performed on the combined data, and the new signals will be separated by the inverse transform.




回答2:


Since stereo channels are independent you need to apply the FFT to each channel. If you want only to process a single channel you would need to convert both stereo channels into a mono channel.



来源:https://stackoverflow.com/questions/14477454/apply-fft-to-a-both-channels-of-a-stereo-signal-separately

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!