annotate dsp/transforms/kissfft/kiss_fftr.h @ 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 6cb2b3cd5356
children
rev   line source
cannam@64 1 #ifndef KISS_FTR_H
cannam@64 2 #define KISS_FTR_H
cannam@64 3
cannam@64 4 #include "kiss_fft.h"
cannam@64 5 #ifdef __cplusplus
cannam@64 6 extern "C" {
cannam@64 7 #endif
cannam@64 8
cannam@64 9
cannam@64 10 /*
cannam@64 11
cannam@64 12 Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
cannam@64 13
cannam@64 14
cannam@64 15
cannam@64 16 */
cannam@64 17
cannam@64 18 typedef struct kiss_fftr_state *kiss_fftr_cfg;
cannam@64 19
cannam@64 20
cannam@64 21 kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
cannam@64 22 /*
cannam@64 23 nfft must be even
cannam@64 24
cannam@64 25 If you don't care to allocate space, use mem = lenmem = NULL
cannam@64 26 */
cannam@64 27
cannam@64 28
cannam@64 29 void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
cannam@64 30 /*
cannam@64 31 input timedata has nfft scalar points
cannam@64 32 output freqdata has nfft/2+1 complex points
cannam@64 33 */
cannam@64 34
cannam@64 35 void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
cannam@64 36 /*
cannam@64 37 input freqdata has nfft/2+1 complex points
cannam@64 38 output timedata has nfft scalar points
cannam@64 39 */
cannam@64 40
cannam@64 41 #define kiss_fftr_free free
cannam@64 42
cannam@64 43 #ifdef __cplusplus
cannam@64 44 }
cannam@64 45 #endif
cannam@64 46 #endif