26 pffft_destroy_setup(
setup);
37 pffft_transform(
setup, input, output, NULL, PFFFT_FORWARD);
45 pffft_transform(
setup, input, output, NULL, PFFFT_BACKWARD);
59 void rfft(
const float* input,
float* output) {
60 pffft_transform_ordered(
setup, input, output, NULL, PFFFT_FORWARD);
63 void irfft(
const float* input,
float* output) {
64 pffft_transform_ordered(
setup, input, output, NULL, PFFFT_BACKWARD);
71 for (
int i = 0; i <
length; i++) {
91 pffft_destroy_setup(
setup);
99 pffft_transform(
setup, input, output, NULL, PFFFT_FORWARD);
107 pffft_transform(
setup, input, output, NULL, PFFFT_BACKWARD);
110 void fft(
const float* input,
float* output) {
111 pffft_transform_ordered(
setup, input, output, NULL, PFFFT_FORWARD);
114 void ifft(
const float* input,
float* output) {
115 pffft_transform_ordered(
setup, input, output, NULL, PFFFT_BACKWARD);
120 for (
int i = 0; i <
length; i++) {
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Complex-valued FFT context.
Definition fft.hpp:81
~ComplexFFT()
Definition fft.hpp:90
void fftUnordered(const float *input, float *output)
Performs the complex FFT.
Definition fft.hpp:98
void ifftUnordered(const float *input, float *output)
Performs the inverse complex FFT.
Definition fft.hpp:106
void fft(const float *input, float *output)
Definition fft.hpp:110
PFFFT_Setup * setup
Definition fft.hpp:82
ComplexFFT(size_t length)
Definition fft.hpp:85
int length
Definition fft.hpp:83
void ifft(const float *input, float *output)
Definition fft.hpp:114
void scale(float *x)
Definition fft.hpp:118
Real-valued FFT context.
Definition fft.hpp:16
void rfftUnordered(const float *input, float *output)
Performs the real FFT.
Definition fft.hpp:36
~RealFFT()
Definition fft.hpp:25
int length
Definition fft.hpp:18
RealFFT(size_t length)
Definition fft.hpp:20
void rfft(const float *input, float *output)
Slower than the above methods, but returns results in the "canonical" FFT order as follows.
Definition fft.hpp:59
void scale(float *x)
Scales the RFFT so that scale(IFFT(FFT(x))) = x.
Definition fft.hpp:69
PFFFT_Setup * setup
Definition fft.hpp:17
void irfftUnordered(const float *input, float *output)
Performs the inverse real FFT.
Definition fft.hpp:44
void irfft(const float *input, float *output)
Definition fft.hpp:63