// uint_t overlap_size = 256;
uint_t buffer_size = 1024;
uint_t overlap_size = 512;
+// uint_t buffer_size = 2048;
+// uint_t overlap_size = 1024;
uint_t channels = 1;
uint_t samplerate = 44100;
AUBIO_DBG("filter tables frequencies\n");
for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++)
AUBIO_DBG("filter n. %d %f %f %f %f\n",filter_cnt, lower_freqs->data[0][filter_cnt], center_freqs->data[0][filter_cnt], upper_freqs->data[0][filter_cnt], triangle_heights->data[0][filter_cnt]);
-
-
+
//filling the fft_freqs lookup table, which assigns the frequency in hz to each bin
-
for(bin_cnt=0; bin_cnt<win_s; bin_cnt++){
-
//TODO: check the formula!
-
fft_freqs->data[0][bin_cnt]= (smpl_t)samplerate* (smpl_t)bin_cnt/ (smpl_t)win_s;
-
}
-
-
+
//building each filter table
for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++){
//TODO:check special case : lower freq =0
-
//calculating rise increment in mag/Hz
smpl_t riseInc= triangle_heights->data[0][filter_cnt]/(center_freqs->data[0][filter_cnt]-lower_freqs->data[0][filter_cnt]);
- //zeroing begining of filter
- AUBIO_DBG("\nfilter %d",filter_cnt);
+ AUBIO_DBG("\nfilter %d",filter_cnt);
+ //zeroing begining of filter
AUBIO_DBG("\nzero begin\n");
-
for(bin_cnt=0; bin_cnt<win_s-1; bin_cnt++){
//zeroing beigining of array
fb->filters[filter_cnt]->data[0][bin_cnt]=0.f;
smpl_t aubio_zero_crossing_rate(fvec_t * input);
smpl_t aubio_spectral_centroid(cvec_t * spectrum, smpl_t samplerate);
+/* filterbank */
+
+/* mfcc */
+aubio_mfcc_t * new_aubio_mfcc (uint_t win_s, uint_t samplerate, uint_t n_filters, uint_t n_coefs, smpl_t lowfreq, smpl_t highfreq, uint_t channels);
+void del_aubio_mfcc(aubio_mfcc_t *mf);
+void aubio_mfcc_do(aubio_mfcc_t *mf, cvec_t *in, fvec_t *out);
+
+
/* scale */
extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig );
extern void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);