Ignore:
Timestamp:
Sep 5, 2007, 9:37:09 PM (17 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

minor corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiomfcc.c

    r88199ce rfe28ff3  
    4242      aubio_pvoc_do (pv,ibuf, fftgrain);
    4343     
    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);
    4847     
    4948     
     
    7473int main(int argc, char **argv) {
    7574  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
    7692  examples_common_process(aubio_process,process_print);
    7793  examples_common_del();
    7894  debug("End of program.\n");
    7995  fflush(stderr);
     96 
     97  //destroying filterbank
     98  free(mf);
     99 
    80100  return 0;
    81101}
Note: See TracChangeset for help on using the changeset viewer.