Changeset bc4ba75


Ignore:
Timestamp:
Sep 12, 2007, 7:36:11 PM (17 years ago)
Author:
Amaury Hazan <mahmoudax@gmail.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:
e5f6a0b
Parents:
95a64c7
Message:

added mfcc binding

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r95a64c7 rbc4ba75  
    4444uint_t buffer_size                    = 1024;
    4545uint_t overlap_size                   = 512;
     46// uint_t buffer_size                    = 2048;
     47// uint_t overlap_size                   = 1024;
    4648uint_t channels                       = 1;
    4749uint_t samplerate                     = 44100;
  • src/filterbank.c

    r95a64c7 rbc4ba75  
    225225  for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++)
    226226    AUBIO_DBG("filter n. %d %f %f %f %f\n",filter_cnt, lower_freqs->data[0][filter_cnt], center_freqs->data[0][filter_cnt], upper_freqs->data[0][filter_cnt], triangle_heights->data[0][filter_cnt]);
    227  
    228  
     227
    229228  //filling the fft_freqs lookup table, which assigns the frequency in hz to each bin
    230  
    231229  for(bin_cnt=0; bin_cnt<win_s; bin_cnt++){
    232    
    233230    //TODO: check the formula!
    234    
    235231    fft_freqs->data[0][bin_cnt]= (smpl_t)samplerate* (smpl_t)bin_cnt/ (smpl_t)win_s;
    236 
    237   }
    238  
    239  
     232  }
     233
    240234  //building each filter table
    241235  for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++){
    242236
    243237    //TODO:check special case : lower freq =0
    244    
    245238    //calculating rise increment in mag/Hz
    246239    smpl_t riseInc= triangle_heights->data[0][filter_cnt]/(center_freqs->data[0][filter_cnt]-lower_freqs->data[0][filter_cnt]);
    247240   
     241
     242    AUBIO_DBG("\nfilter %d",filter_cnt);
    248243    //zeroing begining of filter
    249     AUBIO_DBG("\nfilter %d",filter_cnt);
    250 
    251244    AUBIO_DBG("\nzero begin\n");
    252    
    253245    for(bin_cnt=0; bin_cnt<win_s-1; bin_cnt++){
    254246      //zeroing beigining of array
  • swig/aubio.i

    r95a64c7 rbc4ba75  
    148148smpl_t aubio_zero_crossing_rate(fvec_t * input);
    149149smpl_t aubio_spectral_centroid(cvec_t * spectrum, smpl_t samplerate);
     150
     151/* filterbank */
     152
     153/* mfcc */
     154aubio_mfcc_t * new_aubio_mfcc (uint_t win_s, uint_t samplerate, uint_t n_filters, uint_t n_coefs, smpl_t lowfreq, smpl_t highfreq, uint_t channels);
     155void del_aubio_mfcc(aubio_mfcc_t *mf);
     156void aubio_mfcc_do(aubio_mfcc_t *mf, cvec_t *in, fvec_t *out);
     157
    150158
    151159/* scale */
Note: See TracChangeset for help on using the changeset viewer.