Changes in examples/aubiomfcc.c [f72ceeb:38837b1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
rf72ceeb r38837b1 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;28 25 29 26 unsigned int pos = 0; /*frames%dspblocksize*/ … … 53 50 //compute mfccs 54 51 aubio_mfcc_do(mfcc, fftgrain, mfcc_out); 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 52 62 53 /* end of block loop */ 63 54 pos = -1; /* so it will be zero next j loop */ … … 74 65 */ 75 66 76 uint_t coef_cnt;67 uint_t filter_cnt; 77 68 if (output_filename == NULL) { 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 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"); 87 79 } 88 80 } … … 90 82 int main(int argc, char **argv) { 91 83 // params 92 84 uint_t n_filters = 11; 93 85 examples_common_init(argc,argv); 94 smpl_t lowfreq = 133.333f; 95 smpl_t highfreq = 44100.f; 96 mfcc_out = new_fvec(n_coefs,channels); 97 86 smpl_t lowfreq = 0.; 87 smpl_t highfreq = samplerate; 88 mfcc_out = new_fvec(n_filters,channels); 98 89 99 90 //populating the filter 100 mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, n_coefs , lowfreq, highfreq, channels); 101 dump_filterbank(mfcc); 102 103 91 mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, lowfreq, highfreq, 92 channels); 93 104 94 //process 105 95 examples_common_process(aubio_process,process_print);
Note: See TracChangeset
for help on using the changeset viewer.