Changeset 97886fa
- Timestamp:
- Sep 6, 2007, 3:45:23 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:
- 71b1b4b, fdf39ba
- Parents:
- 71d3bf0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
r71d3bf0 r97886fa 50 50 51 51 //compute mfccs 52 aubio_mffc_do(fftgrain->norm, nframes, filterbank, outbuf);52 aubio_mffc_do(fftgrain->norm, nframes, mf, outbuf); 53 53 54 54 for (coef_cnt=0; coef_cnt<n_filters ; coef_cnt++) … … 93 93 aubio_mel_filter * mf = (aubio_mel_filter *)getbytes(banksize); 94 94 95 mf ilterbank->n_filters = 20;96 mf ilterbank->filters = (smpl_t **)getbytes(mf->n_filters * sizeof(smpl_t *));95 mf->n_filters = 20; 96 mf->filters = (smpl_t **)getbytes(mf->n_filters * sizeof(smpl_t *)); 97 97 for(n = 0; n < mf->n_filters; n++) 98 98 mf->filters[n] = (smpl_t *)getbytes((buffer_size/2+1) * sizeof(smpl_t)); -
src/mfcc.c
r71d3bf0 r97886fa 41 41 } 42 42 43 //TODO: check that zero padding 43 44 for(n = filter + 1; n < N; n++) result[n] = 0; 44 45 … … 50 51 int aubio_dct_do(const float *data, const int N, const void *argv, float *result){ 51 52 53 54 //call aubio p_voc in dct setting 55 56 //TODO: fvec as input? Remove data length, N? 57 58 //compute mag spectrum 59 aubio_pvoc_do (pv,data, fftgrain); 60 61 int i; 62 //extract real part of fft grain 63 for(i=0; i<N ;i++){ 64 result[i]= fftgrain->norm[i]*cos(fftgrain->phase[i]); 65 } 66 67 /* 52 68 fftwf_plan plan; 53 69 … … 56 72 57 73 fftwf_execute(plan); 58 fftwf_destroy_plan(plan); 74 fftwf_destroy_plan(plan);*/ 59 75 60 76 return XTRACT_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.