Changeset 97886fa


Ignore:
Timestamp:
Sep 6, 2007, 3:45:23 PM (13 years ago)
Author:
Amaury Hazan <mahmoudax@gmail.com>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
71b1b4b, fdf39ba
Parents:
71d3bf0
Message:

minor changes

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiomfcc.c

    r71d3bf0 r97886fa  
    5050       
    5151      //compute mfccs
    52       aubio_mffc_do(fftgrain->norm, nframes, filterbank, outbuf);
     52      aubio_mffc_do(fftgrain->norm, nframes, mf, outbuf);
    5353     
    5454      for (coef_cnt=0; coef_cnt<n_filters ; coef_cnt++)
     
    9393  aubio_mel_filter * mf = (aubio_mel_filter *)getbytes(banksize);
    9494
    95   mfilterbank->n_filters = 20;
    96   mfilterbank->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 *));
    9797  for(n = 0; n < mf->n_filters; n++)
    9898    mf->filters[n] = (smpl_t *)getbytes((buffer_size/2+1) * sizeof(smpl_t));
  • src/mfcc.c

    r71d3bf0 r97886fa  
    4141    }
    4242
     43    //TODO: check that zero padding
    4344    for(n = filter + 1; n < N; n++) result[n] = 0;
    4445   
     
    5051int aubio_dct_do(const float *data, const int N, const void *argv, float *result){
    5152   
     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    /*
    5268    fftwf_plan plan;
    5369   
     
    5672   
    5773    fftwf_execute(plan);
    58     fftwf_destroy_plan(plan);
     74    fftwf_destroy_plan(plan);*/
    5975
    6076    return XTRACT_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.