Changeset fdf39ba for examples/aubiomfcc.c
- Timestamp:
- Sep 7, 2007, 10:49:45 AM (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:
- 8708556
- Parents:
- 97886fa (diff), 7c6c806d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
r97886fa rfdf39ba 26 26 unsigned int i; /*channels*/ 27 27 unsigned int j; /*frames*/ 28 28 29 for (j=0;j<(unsigned)nframes;j++) { 29 30 if(usejack) { … … 42 43 aubio_pvoc_do (pv,ibuf, fftgrain); 43 44 45 uint_t n_coefs= n_filters/2 +1; 44 46 uint_t coef_cnt; 45 uint_t n_filters=20; 46 smpl_t outbuf[20]; 47 47 48 48 for (coef_cnt=0; coef_cnt<n_ filters ; coef_cnt++)49 outbuf[coef_cnt]=0.f;49 for (coef_cnt=0; coef_cnt<n_coefs ; coef_cnt++) 50 mfcc_outbuf[coef_cnt]=0.f; 50 51 51 52 //compute mfccs 52 aubio_mffc_do(fftgrain->norm, nframes, mf, outbuf);53 aubio_mffc_do(fftgrain->norm, nframes, mf, mfcc_outbuf, fft_dct, fftgrain_dct); 53 54 54 for (coef_cnt=0; coef_cnt<n_ filters ; coef_cnt++)55 outmsg("%f ", outbuf[coef_cnt]);55 for (coef_cnt=0; coef_cnt<n_coefs ; coef_cnt++) 56 outmsg("%f ",mfcc_outbuf[coef_cnt]); 56 57 outmsg("\n"); 57 58 … … 85 86 86 87 //allocate and initialize mel filter bank 87 uint_t n_filters=20; 88 uint_t nyquist= samplerate / 2.; 89 smpl_t lowfreq=80.f; 90 smpl_t highfreq=18000.f; 88 91 89 90 //allocating global mf (in utils.c) 92 91 uint_t banksize = (uint) ( sizeof(aubio_mel_filter)); 93 aubio_mel_filter *mf = (aubio_mel_filter *)getbytes(banksize);92 mf = (aubio_mel_filter *)getbytes(banksize); 94 93 95 94 mf->n_filters = 20;
Note: See TracChangeset
for help on using the changeset viewer.