Changeset 71d3bf0
- Timestamp:
- Sep 6, 2007, 2:33:11 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:
- 97886fa
- Parents:
- fe28ff3
- Files:
-
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
examples/aubiomfcc.c
rfe28ff3 r71d3bf0 41 41 //compute mag spectrum 42 42 aubio_pvoc_do (pv,ibuf, fftgrain); 43 44 uint_t coef_cnt; 45 uint_t n_filters=20; 46 smpl_t outbuf[20]; 47 48 for (coef_cnt=0; coef_cnt<n_filters ; coef_cnt++) 49 outbuf[coef_cnt]=0.f; 50 51 //compute mfccs 52 aubio_mffc_do(fftgrain->norm, nframes, filterbank, outbuf); 43 53 44 45 //compute mfcics46 aubio_mffc_do(fftgrain->norm, nframes, filterbank, outbuf);54 for (coef_cnt=0; coef_cnt<n_filters ; coef_cnt++) 55 outmsg("%f ",outbuf[coef_cnt]); 56 outmsg("\n"); 47 57 48 58 … … 77 87 uint_t n_filters=20; 78 88 uint_t nyquist= samplerate / 2.; 89 smpl_t lowfreq=80.f; 90 smpl_t highfreq=18000.f; 79 91 80 92 uint_t banksize = (uint) ( sizeof(aubio_mel_filter)); … … 87 99 88 100 //populating the filter 89 new_aubio_mfcc(buffer_size, nyquist, XTRACT_EQUAL_GAIN, 80.0f, 18000.0f, mf->n_filters, mf->filters);101 aubio_mfcc_init(buffer_size, nyquist, XTRACT_EQUAL_GAIN, lowfreq, highfreq, mf->n_filters, mf->filters); 90 102 91 103 //process -
src/Makefile.am
rfe28ff3 r71d3bf0 22 22 onset.h \ 23 23 tempo.h \ 24 filter.h 24 filter.h 25 25 26 nodist_pkginclude_HEADERS = config.h 26 27 … … 69 70 tempo.h \ 70 71 filter.c \ 71 filter.h 72 filter.h \ 72 73 73 74 AM_CFLAGS = @AUBIO_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@ -
src/filterbank.c
rfe28ff3 r71d3bf0 21 21 */ 22 22 23 #include " aubiofilterbank.h"23 #include "filterbank.h" 24 24 25 25 // Initialization -
src/mfcc.c
rfe28ff3 r71d3bf0 23 23 24 24 #include "mffc.h" 25 #include "aubiofilterbank.h"26 25 27 26 // Computation -
src/mfcc.h
rfe28ff3 r71d3bf0 24 24 #define MFCC_H 25 25 26 #include "aubiofilterbank.h" 27 28 #define NYQUIST 22050.f 26 #include "filterbank.h" 29 27 30 28 //libXtract enums
Note: See TracChangeset
for help on using the changeset viewer.