Changeset 71d3bf0


Ignore:
Timestamp:
Sep 6, 2007, 2:33:11 AM (17 years ago)
Author:
Amaury Hazan <mahmoudax@gmail.com>
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
Message:

small adds

Files:
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • examples/aubiomfcc.c

    rfe28ff3 r71d3bf0  
    4141      //compute mag spectrum
    4242      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);
    4353     
    44        
    45       //compute mfcics
    46       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");
    4757     
    4858     
     
    7787  uint_t n_filters=20;
    7888  uint_t nyquist= samplerate / 2.;
     89  smpl_t lowfreq=80.f;
     90  smpl_t highfreq=18000.f;
    7991
    8092  uint_t banksize = (uint) ( sizeof(aubio_mel_filter));
     
    8799 
    88100  //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);
    90102
    91103  //process
  • src/Makefile.am

    rfe28ff3 r71d3bf0  
    2222        onset.h \
    2323        tempo.h \
    24         filter.h
     24        filter.h
     25
    2526nodist_pkginclude_HEADERS = config.h
    2627
     
    6970        tempo.h \
    7071        filter.c \
    71         filter.h
     72        filter.h \
    7273
    7374AM_CFLAGS = @AUBIO_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@
  • src/filterbank.c

    rfe28ff3 r71d3bf0  
    2121*/
    2222
    23 #include "aubiofilterbank.h"
     23#include "filterbank.h"
    2424
    2525// Initialization
  • src/mfcc.c

    rfe28ff3 r71d3bf0  
    2323
    2424#include "mffc.h"
    25 #include "aubiofilterbank.h"
    2625
    2726// Computation
  • src/mfcc.h

    rfe28ff3 r71d3bf0  
    2424#define MFCC_H
    2525
    26 #include "aubiofilterbank.h"
    27 
    28 #define NYQUIST 22050.f
     26#include "filterbank.h"
    2927
    3028//libXtract enums
Note: See TracChangeset for help on using the changeset viewer.