MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / Inverse

Method Inverse

Source/FFT.cpp:79–98  ·  view source on GitHub ↗

Perform inverse FFT, returning real data Accepts: input_re - pointer to an array of the real part of the output, size nfft/2 + 1 input_im - pointer to an array of the imaginary part of the output, size nfft/2 + 1 output - pointer to an array of (real) input values, size nfft

Source from the content-addressed store, hash-verified

77// size nfft/2 + 1
78// output - pointer to an array of (real) input values, size nfft
79void FFT::Inverse(float* input_re, float* input_im, float* output)
80{
81 int hnfft;
82
83 hnfft = mNfft / 2;
84
85 for (int ti = 0; ti < hnfft; ti++)
86 {
87 mFft_data[ti] = input_re[ti];
88 mFft_data[mNfft - 1 - ti] = input_im[ti];
89 }
90 mFft_data[hnfft] = input_re[hnfft];
91
92 mayer_realifft(mNfft, mFft_data);
93
94 for (int ti = 0; ti < mNfft; ti++)
95 {
96 output[ti] = mFft_data[ti];
97 }
98}
99
100
101/* This is the FFT routine taken from PureData, a great piece of

Callers 7

AutotalentMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80
PitchDetectorMethod · 0.80
DetectPitchMethod · 0.80
ProcessMethod · 0.80

Calls 1

mayer_realifftFunction · 0.85

Tested by

no test coverage detected