summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2019-05-14 00:39:42 +0200
committerDaniel Schürmann <daschuer@mixxx.org>2019-05-14 00:39:42 +0200
commit08367f5361171fda53e3df44965d5eb6359d4125 (patch)
tree29775a0bc857a045eb9466d68718f25b0a1ac47f /lib
parentffa1bcaf5db5edea01dd8dd3da681cfdae890d14 (diff)
Disable suspicious code splitting the reference hanning window
After this change, the refence sine waves of a full half note are centered on the desired bin. This was not the case before.
Diffstat (limited to 'lib')
-rw-r--r--lib/qm-dsp/dsp/chromagram/ConstantQ.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/qm-dsp/dsp/chromagram/ConstantQ.cpp b/lib/qm-dsp/dsp/chromagram/ConstantQ.cpp
index 414833f2b8..aab4848406 100644
--- a/lib/qm-dsp/dsp/chromagram/ConstantQ.cpp
+++ b/lib/qm-dsp/dsp/chromagram/ConstantQ.cpp
@@ -144,6 +144,10 @@ void ConstantQ::sparsekernel()
hammingWindowIm[ origin + i ] = absol*imag;
}
+ /* This code splits the hanning widow and moves it to the beginning
+ and the end, creating an epty gap in the middle.
+ Is disables, because it results in wrong results,
+ when tested with sin waves centered on a bin frequency.
for (unsigned i = 0; i < m_FFTLength/2; ++i) {
double temp = hammingWindowRe[i];
hammingWindowRe[i] = hammingWindowRe[i + m_FFTLength/2];
@@ -152,6 +156,7 @@ void ConstantQ::sparsekernel()
hammingWindowIm[i] = hammingWindowIm[i + m_FFTLength/2];
hammingWindowIm[i + m_FFTLength/2] = temp;
}
+ */
//do fft of hammingWindow
m_FFT.process( 0, hammingWindowRe, hammingWindowIm, transfHammingWindowRe, transfHammingWindowIm );