Changeset 2a77ff0


Ignore:
Timestamp:
Sep 8, 2007, 3:46:26 PM (13 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
53a7576
Parents:
3504fd7f
Message:

aubiomfcc.c: prepare text output, rename output buffer to mfcc_out

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiomfcc.c

    r3504fd7f r2a77ff0  
    2020
    2121/* mfcc objects */
    22 fvec_t * mfcc_outbuf;
     22fvec_t * mfcc_out;
    2323aubio_mfcc_t * mfcc;
    2424
     
    4848     
    4949      //compute mfccs
    50       aubio_mfcc_do(mfcc, fftgrain, mfcc_outbuf);
     50      aubio_mfcc_do(mfcc, fftgrain, mfcc_out);
    5151
    5252      /* end of block loop */
     
    6464      */
    6565     
     66      uint_t filter_cnt;
    6667      if (output_filename == NULL) {
    6768        if(frames >= 4) {
    68           outmsg("%f\n",(frames-4)*overlap_size/(float)samplerate);
     69          outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate);
    6970        } else if (frames < 4) {
    70           outmsg("%f\n",0.);
     71          outmsg("%f\t",0.);
    7172        }
     73        outmsg("%f",mfcc_out->data[0][0]);
     74        for (filter_cnt = 1; filter_cnt < mfcc_out->length; filter_cnt++) {
     75          outmsg(",%f",mfcc_out->data[0][filter_cnt]);
     76        }
     77        outmsg("\n");
    7278      }
    7379}
     
    7985  smpl_t highfreq = 2000.;
    8086  examples_common_init(argc,argv);
    81   mfcc_outbuf = new_fvec(n_filters,channels);
     87  mfcc_out = new_fvec(n_filters,channels);
    8288 
    8389  //populating the filter
     
    9399  //destroying mfcc
    94100  del_aubio_mfcc(mfcc);
    95   del_fvec(mfcc_outbuf);
     101  del_fvec(mfcc_out);
    96102 
    97103  return 0;
Note: See TracChangeset for help on using the changeset viewer.