comparison dsp/tempotracking/DownBeat.cpp @ 114:f6ccde089491 pvoc

Tidy real-to-complex FFT -- forward and inverse have different arguments, so make them separate functions; document
author Chris Cannam
date Wed, 02 Oct 2013 15:04:38 +0100
parents e5907ae6de17
children a2b3fd07d862
comparison
equal deleted inserted replaced
113:3cb359d043f0 114:f6ccde089491
191 m_beatframe[j] = 0.0; 191 m_beatframe[j] = 0.0;
192 } 192 }
193 193
194 // Now FFT beat frame 194 // Now FFT beat frame
195 195
196 m_fft->process(false, m_beatframe, m_fftRealOut, m_fftImagOut); 196 m_fft->forward(m_beatframe, m_fftRealOut, m_fftImagOut);
197 197
198 // Calculate magnitudes 198 // Calculate magnitudes
199 199
200 for (size_t j = 0; j < m_beatframesize/2; ++j) { 200 for (size_t j = 0; j < m_beatframesize/2; ++j) {
201 newspec[j] = sqrt(m_fftRealOut[j] * m_fftRealOut[j] + 201 newspec[j] = sqrt(m_fftRealOut[j] * m_fftRealOut[j] +