- Timestamp:
- Sep 5, 2007, 9:37:09 PM (17 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 71d3bf0
- Parents:
- 88199ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
r88199ce rfe28ff3 42 42 aubio_pvoc_do (pv,ibuf, fftgrain); 43 43 44 //TODO: extract Magnitude buffer f_fvec from fftgrain cvec 45 46 //compute mfccs 47 aubio_mffc_do (magbuf, nframes, filterbank, outbuf); 44 45 //compute mfcics 46 aubio_mffc_do(fftgrain->norm, nframes, filterbank, outbuf); 48 47 49 48 … … 74 73 int main(int argc, char **argv) { 75 74 examples_common_init(argc,argv); 75 76 //allocate and initialize mel filter bank 77 uint_t n_filters=20; 78 uint_t nyquist= samplerate / 2.; 79 80 uint_t banksize = (uint) ( sizeof(aubio_mel_filter)); 81 aubio_mel_filter * mf = (aubio_mel_filter *)getbytes(banksize); 82 83 mfilterbank->n_filters = 20; 84 mfilterbank->filters = (smpl_t **)getbytes(mf->n_filters * sizeof(smpl_t *)); 85 for(n = 0; n < mf->n_filters; n++) 86 mf->filters[n] = (smpl_t *)getbytes((buffer_size/2+1) * sizeof(smpl_t)); 87 88 //populating the filter 89 new_aubio_mfcc(buffer_size, nyquist, XTRACT_EQUAL_GAIN, 80.0f, 18000.0f, mf->n_filters, mf->filters); 90 91 //process 76 92 examples_common_process(aubio_process,process_print); 77 93 examples_common_del(); 78 94 debug("End of program.\n"); 79 95 fflush(stderr); 96 97 //destroying filterbank 98 free(mf); 99 80 100 return 0; 81 101 }
Note: See TracChangeset
for help on using the changeset viewer.