Changes in examples/aubiomfcc.c [38837b1:f72ceeb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
r38837b1 rf72ceeb 23 23 fvec_t * mfcc_out; 24 24 aubio_mfcc_t * mfcc; 25 26 uint_t n_filters = 40; 27 uint_t n_coefs = 20; 25 28 26 29 unsigned int pos = 0; /*frames%dspblocksize*/ … … 50 53 //compute mfccs 51 54 aubio_mfcc_do(mfcc, fftgrain, mfcc_out); 52 55 56 uint_t coef_cnt; 57 for (coef_cnt = 0; coef_cnt < n_coefs; coef_cnt++) { 58 outmsg("%f ",mfcc_out->data[0][coef_cnt]); 59 } 60 outmsg("\n"); 61 53 62 /* end of block loop */ 54 63 pos = -1; /* so it will be zero next j loop */ … … 65 74 */ 66 75 67 uint_t filter_cnt;76 uint_t coef_cnt; 68 77 if (output_filename == NULL) { 69 if(frames >= 4) { 70 outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate); 71 } else if (frames < 4) { 72 outmsg("%f\t",0.); 73 } 74 outmsg("%f",mfcc_out->data[0][0]); 75 for (filter_cnt = 1; filter_cnt < mfcc_out->length; filter_cnt++) { 76 outmsg(",%f",mfcc_out->data[0][filter_cnt]); 77 } 78 outmsg("\n"); 78 // if(frames >= 4) { 79 // outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate); 80 // } 81 // else if (frames < 4) { 82 // outmsg("%f\t",0.); 83 // } 84 //outmsg("%f ",mfcc_out->data[0][0]); 85 86 79 87 } 80 88 } … … 82 90 int main(int argc, char **argv) { 83 91 // params 84 uint_t n_filters = 11;92 85 93 examples_common_init(argc,argv); 86 smpl_t lowfreq = 0.; 87 smpl_t highfreq = samplerate; 88 mfcc_out = new_fvec(n_filters,channels); 94 smpl_t lowfreq = 133.333f; 95 smpl_t highfreq = 44100.f; 96 mfcc_out = new_fvec(n_coefs,channels); 97 89 98 90 99 //populating the filter 91 mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, lowfreq, highfreq, 92 channels); 93 100 mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, n_coefs , lowfreq, highfreq, channels); 101 dump_filterbank(mfcc); 102 103 94 104 //process 95 105 examples_common_process(aubio_process,process_print);
Note: See TracChangeset
for help on using the changeset viewer.