Changeset 4621cd6 for examples/aubiomfcc.c
- Timestamp:
- Dec 4, 2009, 1:46:40 AM (14 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:
- aea235c
- Parents:
- c17a0ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
rc17a0ee r4621cd6 33 33 34 34 static int aubio_process(smpl_t **input, smpl_t **output, int nframes) { 35 unsigned int i; /*channels*/36 35 unsigned int j; /*frames*/ 37 36 38 37 for (j=0;j<(unsigned)nframes;j++) { 39 38 if(usejack) { 40 for (i=0;i<channels;i++) { 41 /* write input to datanew */ 42 fvec_write_sample(ibuf, input[i][j], i, pos); 43 /* put synthnew in output */ 44 output[i][j] = fvec_read_sample(obuf, i, pos); 45 } 39 /* write input to datanew */ 40 fvec_write_sample(ibuf, input[0][j], pos); 41 /* put synthnew in output */ 42 output[0][j] = fvec_read_sample(obuf, pos); 46 43 } 47 44 /*time for fft*/ … … 50 47 51 48 //compute mag spectrum 52 aubio_pvoc_do (pv, ibuf, fftgrain);49 aubio_pvoc_do (pv, ibuf, fftgrain); 53 50 54 51 //compute mfccs … … 72 69 outmsg("%f\t",frames*overlap_size/(float)samplerate); 73 70 for (coef_cnt = 0; coef_cnt < n_coefs; coef_cnt++) { 74 outmsg("%f ", fvec_read_sample (mfcc_out, 0,coef_cnt) );71 outmsg("%f ", fvec_read_sample (mfcc_out, coef_cnt) ); 75 72 } 76 73 outmsg("\n"); … … 86 83 87 84 /* phase vocoder */ 88 pv = new_aubio_pvoc (buffer_size, overlap_size , channels);85 pv = new_aubio_pvoc (buffer_size, overlap_size); 89 86 90 fftgrain = new_cvec (buffer_size , channels);87 fftgrain = new_cvec (buffer_size); 91 88 92 89 //populating the filter 93 90 mfcc = new_aubio_mfcc(buffer_size, n_filters, n_coefs, samplerate); 94 91 95 mfcc_out = new_fvec(n_coefs ,channels);92 mfcc_out = new_fvec(n_coefs); 96 93 97 94 //process
Note: See TracChangeset
for help on using the changeset viewer.