Changes in / [83d5abf:787f1f3]


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiomfcc.c

    r83d5abf r787f1f3  
    2525
    2626uint_t n_filters = 40;
    27 uint_t n_coefs = 20;
     27uint_t n_coefs = 11;
    2828
    2929unsigned int pos = 0; /*frames%dspblocksize*/
  • src/filterbank.c

    r83d5abf r787f1f3  
    182182  //buffers for computing filter frequencies
    183183  fvec_t * freqs=new_fvec( allFilters +2 , 1);
     184 
    184185  fvec_t * lower_freqs=new_fvec( allFilters, 1);
    185186  fvec_t * upper_freqs=new_fvec( allFilters, 1);
    186187  fvec_t * center_freqs=new_fvec( allFilters, 1);
     188     
     189  /*fvec_t * lower_freqs=freqs;
     190  fvec_t * upper_freqs=freqs;
     191  fvec_t * center_freqs=freqs*/;
     192 
    187193  fvec_t * triangle_heights=new_fvec( allFilters, 1);
    188194  //lookup table of each bin frequency in hz
     
    203209 
    204210 
    205   //TODO: Check how these f_vec will be freed
     211  //make fvec->data point directly to freqs arrays
    206212  lower_freqs->data=freqs->data;
    207213  center_freqs->data[0]=&(freqs->data[0][1]);
     
    214220  }
    215221
    216   //debug
    217   debug("filter tables frequencies\n");
     222  //AUBIO_DBG
     223  AUBIO_DBG("filter tables frequencies\n");
    218224  for(filter_cnt=0; filter_cnt<allFilters; filter_cnt++)
    219     debug("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]);
     225    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]);
    220226 
    221227 
     
    240246   
    241247    //zeroing begining of filter
    242     debug("\nfilter %d",filter_cnt);
    243 
    244     debug("\nzero begin\n");
     248    AUBIO_DBG("\nfilter %d",filter_cnt);
     249
     250    AUBIO_DBG("\nzero begin\n");
    245251   
    246252    for(bin_cnt=0; bin_cnt<win_s-1; bin_cnt++){
    247253      //zeroing beigining of array
    248254      fb->filters[filter_cnt]->data[0][bin_cnt]=0.f;
    249       debug(".");
    250       //debug("%f %f %f\n", fft_freqs->data[0][bin_cnt], fft_freqs->data[0][bin_cnt+1], lower_freqs->data[0][filter_cnt]);
     255      AUBIO_DBG(".");
     256      //AUBIO_DBG("%f %f %f\n", fft_freqs->data[0][bin_cnt], fft_freqs->data[0][bin_cnt+1], lower_freqs->data[0][filter_cnt]);
    251257      if(fft_freqs->data[0][bin_cnt]<= lower_freqs->data[0][filter_cnt] && fft_freqs->data[0][bin_cnt+1]> lower_freqs->data[0][filter_cnt]){
    252258        break;
     
    255261    bin_cnt++;
    256262   
    257     debug("\npos slope\n");
     263    AUBIO_DBG("\npos slope\n");
    258264    //positive slope
    259265    for(; bin_cnt<win_s-1; bin_cnt++){
    260       debug(".");
     266      AUBIO_DBG(".");
    261267      fb->filters[filter_cnt]->data[0][bin_cnt]=(fft_freqs->data[0][bin_cnt]-lower_freqs->data[0][filter_cnt])*riseInc;
    262268      //if(fft_freqs->data[0][bin_cnt]<= center_freqs->data[0][filter_cnt] && fft_freqs->data[0][bin_cnt+1]> center_freqs->data[0][filter_cnt])
     
    266272    //bin_cnt++;
    267273   
    268     //debug("\nneg slope\n");
    269274   
    270275    //negative slope
     276    AUBIO_DBG("\nneg slope\n");   
    271277    for(; bin_cnt<win_s-1; bin_cnt++){
    272       //debug(".");
     278      //AUBIO_DBG(".");
    273279     
    274280      //checking whether last value is less than 0...
     
    285291    //bin_cnt++;
    286292   
    287     //debug("\nzero end\n");
     293    AUBIO_DBG("\nzero end\n");
    288294    //zeroing tail
    289295    for(; bin_cnt<win_s; bin_cnt++)
    290       //debug(".");
     296      //AUBIO_DBG(".");
    291297      fb->filters[filter_cnt]->data[0][bin_cnt]=0.f;
    292298
Note: See TracChangeset for help on using the changeset viewer.