comparison dsp/tempotracking/DownBeat.cpp @ 339:9c8ee77db9de

Tidy real-to-complex FFT -- forward and inverse have different arguments, so make them separate functions; document
author Chris Cannam <c.cannam@qmul.ac.uk>
date Wed, 02 Oct 2013 15:04:38 +0100
parents d5014ab8b0e5
children a2b3fd07d862
comparison
equal deleted inserted replaced
338:35db1b24a848 339:9c8ee77db9de
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] +