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

Method Forward

Source/FFT.cpp:51–70  ·  view source on GitHub ↗

Perform forward FFT of real data Accepts: input - pointer to an array of (real) input values, size nfft output_re - pointer to an array of the real part of the output, size nfft/2 + 1 output_im - pointer to an array of the imaginary part of the output, size nfft/2 + 1

Source from the content-addressed store, hash-verified

49// output_im - pointer to an array of the imaginary part of the output,
50// size nfft/2 + 1
51void FFT::Forward(float* input, float* output_re, float* output_im)
52{
53 int hnfft = mNfft / 2;
54
55 for (int ti = 0; ti < mNfft; ti++)
56 {
57 mFft_data[ti] = input[ti];
58 }
59
60 mayer_realfft(mNfft, mFft_data);
61
62 output_im[0] = 0;
63 for (int ti = 0; ti < hnfft; ti++)
64 {
65 output_re[ti] = mFft_data[ti];
66 output_im[ti] = mFft_data[mNfft - 1 - ti];
67 }
68 output_re[hnfft] = mFft_data[hnfft];
69 output_im[hnfft] = 0;
70}
71
72// Perform inverse FFT, returning real data
73// Accepts:

Callers 11

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

Calls 1

mayer_realfftFunction · 0.85

Tested by 1

ProcessMethod · 0.64