#include "aubio_priv.h"
#include "sample.h"
#include "filterbank.h"
+#include "mathutils.h"
#include "stdio.h"
//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;
+ fft_freqs->data[0][bin_cnt]= aubio_bintofreq(bin_cnt, samplerate, win_s);
}
//building each filter table
return;
}
+
+fvec_t * aubio_filterbank_getchannel(aubio_filterbank_t * f, uint_t channel) {
+ if ( (channel >= 0) && (channel < f->n_filters) ) { return f->filters[channel]; }
+ else { return NULL; }
+}
*/
void aubio_filterbank_do(aubio_filterbank_t * fb, cvec_t * in, fvec_t *out);
+/** return the vector containing the filter coefficients of one channel
+
+ */
+fvec_t * aubio_filterbank_getchannel(aubio_filterbank_t * f, uint_t channel);
+
#ifdef __cplusplus
}
#endif