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?
相关问题
- Can we recover audio from MFCC coefficients?
- Is there a way to play audio on a mobile browser w
- Is it possible to know the duration of an MP3 befo
- Playing specific system sound with Qt
- Getting the frequencies associated with STFT in Li
相关文章
- Android Visualizer class throwing runtime exceptio
- Simulate Microphone (virtual mic)
- Android Studio Mediaplayer how to fade in and out
- How should I interpret the output of numpy.fft.rff
- Detect or Approximate Bluetooth Latency on Android
- How to play a specific frequency with Javascript?
- Failed to load because no supported source was fou
- Cross platform audio analysis library
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.
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.