|FFTransform (const float64 &sample_rate)|
|Buffer||fft (const Buffer &time_domain) const|
|Transforms the time_domain signal and calculates the FFT. More...|
|FFTChunkVector||fft (const Buffer &input, int32 n_order, int32 n_overlap=0) const|
|Performs the FFT of size N on the input Buffer of overlaping frames. More...|
|Buffer||ifft (const FFTChunkVector &input) const|
|Peforms an inverse FFT on each FFTChunk and concatenates the output. More...|
|Buffer||ifft (const Buffer &frequency_domain) const|
|Peforms an inverse FFT on the input Buffer. More...|
|void||setWindow (WindowType type)|
|A window is multiplied by the input prior to performing the transform, this help reduce artifacts near the edges. More...|
|static int32||roundUp2 (int32 raw)|
|Returns nearest power of 2 >= raw. More...|
|Samples per second. More...|
|void||fft (Buffer &real, Buffer &img, int32 n_order) const|
|Peforms an inplace, nth order Fast Fouier Transform on the Buffers. More...|
A Class that performes the Fast Fouier Transfrom on a Buffer.
Implementing the fft algorithm on page 235 of the book: "Digital Signal Processing: A Practical Guide for Engineers and Scientists"
|FFTransform::FFTransform||(||const float64 &||sample_rate||)|
Creates an FFTTransform instance. The sample rate here is only used to tell the FFTChunk objects how to plot the spectrum, otherwise it does play a role.
Transforms the time_domain signal and calculates the FFT.
The size of the FFT is determined to be a power of 2 greater than or equal to the length of time_domain. If time_domain is less than a power of 2, the Buffer is padded with zeros until it is exactly a power of 2.
Referenced by Nsound::Spectrogram::computeMagnitude(), fft(), FFTransform_UnitTest(), Nsound::Filter::getFrequencyResponse(), Nsound::Filter::getPhaseResponse(), ifft(), main(), my_main(), Nsound::Stretcher::searchForBestMatch(), and Nsound::Spectrogram::Spectrogram().
Performs the FFT of size N on the input Buffer of overlaping frames.
The size of the FFT is specifed by n_order. The input Buffer is broken up into frames of size n_order, the returned FFTChunkVector is the result for each frame. If n_overlap is > 0, the frames will overlap by that number of samples.
Let n_order = 16 and n_overlap = 0, this how the input is split into frames.
The returned FFTChunkVector will have 3 FFTChunk objects that represent the FFT for each of the frames above, note that the last frame will be padded out to compile a 16-point FFT.
Let n_order = 16 and n_overlap = 4, this how the input is split into frames.
The returned FFTChunkVector will have 4 FFTChunk objects that represent the FFT for each of the frames above, note that the these frames contain overlapping samples as specified. Also note that the last frame in this case has a large number of padded zeros.
Peforms an inverse FFT on each FFTChunk and concatenates the output.
This transforms the frequency domain signals held in the FFTChunkVector back to the time domain. If the FFTChunkVector was created with non-overlapping frames, the resulting output Buffer will be nearly identical to the original input (there will be some small round-off error).
Peforms an inverse FFT on the input Buffer.
This transforms the frequency domain signal held in the input Buffer back to the time domain. The input signal will get padded so its length is exactly a power of 2.
Returns nearest power of 2 >= raw.
Peforms an inplace, nth order Fast Fouier Transform on the Buffers.