Changeset acd97d1 for src/tempo


Ignore:
Timestamp:
Oct 15, 2013, 10:57:38 PM (6 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:
735a739
Parents:
69c39ca
Message:

src/mathutils.{c,h}: remove fvec_quadint, use fvec_quadratic_peak_pos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/beattracking.c

    r69c39ca racd97d1  
    171171  /* find non-zero Rayleigh period */
    172172  maxindex = fvec_max_elem (bt->acfout);
    173   bt->rp = maxindex ? fvec_quadint (bt->acfout, maxindex) : 1;
     173  bt->rp = maxindex ? fvec_quadratic_peak_pos (bt->acfout, maxindex) : 1;
    174174  //rp = (maxindex==127) ? 43 : maxindex; //rayparam
    175175  bt->rp = (maxindex == bt->acfout->length - 1) ? bt->rayparam : maxindex;      //rayparam
     
    204204    phase = step - bt->lastbeat;
    205205  } else {
    206     phase = fvec_quadint (bt->phout, maxindex);
     206    phase = fvec_quadratic_peak_pos (bt->phout, maxindex);
    207207  }
    208208  /* take back one frame delay */
     
    306306    }
    307307    fvec_weight (acfout, bt->gwv);
    308     gp = fvec_quadint (acfout, fvec_max_elem (acfout));
     308    gp = fvec_quadratic_peak_pos (acfout, fvec_max_elem (acfout));
    309309    /*
    310310       while(gp<32) gp =gp*2;
     
    409409aubio_beattracking_get_bpm (aubio_beattracking_t * bt)
    410410{
    411   if (bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {
    412     return 5168. / fvec_quadint (bt->acfout, bt->bp);
     411  if (bt->bp != 0 && bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {
     412    return 5168. / fvec_quadratic_peak_pos (bt->acfout, bt->bp);
    413413  } else {
    414414    return 0.;
Note: See TracChangeset for help on using the changeset viewer.