Mercurial > hg > qm-dsp
comparison dsp/chromagram/CQprecalc.cpp @ 73:dcb555b90924
* Key detector: when returning key strengths, use the peak value of the
three underlying chromagram correlations (from 36-bin chromagram)
corresponding to each key, instead of the mean.
Rationale: This is the same method as used when returning the key value,
and it's nice to have the same results in both returned value and plot.
The peak performed better than the sum with a simple test set of triads,
so it seems reasonable to change the plot to match the key output rather
than the other way around.
* FFT: kiss_fftr returns only the non-conjugate bins, synthesise the rest
rather than leaving them (perhaps dangerously) undefined. Fixes an
uninitialised data error in chromagram that could cause garbage results
from key detector.
* Constant Q: remove precalculated values again, I reckon they're not
proving such a good tradeoff.
author | cannam |
---|---|
date | Fri, 05 Jun 2009 15:12:39 +0000 |
parents | 114e833c07ac |
children |
comparison
equal
deleted
inserted
replaced
72:d0b35b1e3a98 | 73:dcb555b90924 |
---|---|
1 | |
2 #ifdef NOT_DEFINED | |
3 | |
4 // Well, I now think this doesn't save enough time to justify the | |
5 // extra bulk in the plugin executable. But keep it around and only | |
6 // ifdef it out, just in case... | |
7 | |
1 #include <vector> | 8 #include <vector> |
2 using std::vector; | 9 using std::vector; |
3 static unsigned int sk_i_76_16384[5818] = { | 10 static unsigned int sk_i_76_16384[5818] = { |
4 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, | 11 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, |
5 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, | 12 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, |
49836 js.push_back(sk_j_84_65536[i]); | 49843 js.push_back(sk_j_84_65536[i]); |
49837 real.push_back(sk_real_84_65536[i]); | 49844 real.push_back(sk_real_84_65536[i]); |
49838 imag.push_back(sk_imag_84_65536[i]); | 49845 imag.push_back(sk_imag_84_65536[i]); |
49839 } | 49846 } |
49840 } | 49847 } |
49848 | |
49849 #endif | |
49850 |