Ignore:
Timestamp:
Oct 18, 2009, 3:08:59 PM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
e5f49af
Parents:
74516f7
Message:

Change peakpicker to match API specs, make quadint per channel

  • src/mathutils.c
    • add per channel mean and median
    • update moving thres and adapt_thres accordingly
    • change quadint unused span argument to a channel argument
  • src/onset/onset.c:
    • make wasonset a vector for multi channel, use new peakpicker
  • src/onset/peakpick.c:
    • update peakpicker do for multi channeling
  • src/pitch/: update use to fvec_quadint
  • src/tempo/beattracking.c: update calls to fvec_quadint
  • src/tempo/tempo.c: update peakpicker usage
  • tests/src/test-peakpick.c: update peakpicker usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/beattracking.c

    r74516f7 r56ef7e1  
    170170  /* find non-zero Rayleigh period */
    171171  maxindex = fvec_max_elem (bt->acfout);
    172   bt->rp = maxindex ? fvec_quadint (bt->acfout, maxindex, 1) : 1;
     172  bt->rp = maxindex ? fvec_quadint (bt->acfout, maxindex, 0) : 1;
    173173  //rp = (maxindex==127) ? 43 : maxindex; //rayparam
    174174  bt->rp = (maxindex == bt->acfout->length - 1) ? bt->rayparam : maxindex;      //rayparam
     
    203203    phase = step - bt->lastbeat;
    204204  } else {
    205     phase = fvec_quadint (bt->phout, maxindex, 1);
     205    phase = fvec_quadint (bt->phout, maxindex, 0);
    206206  }
    207207  /* take back one frame delay */
     
    305305    }
    306306    fvec_weight (acfout, bt->gwv);
    307     gp = fvec_quadint (acfout, fvec_max_elem (acfout), 1);
     307    gp = fvec_quadint (acfout, fvec_max_elem (acfout), 0);
    308308    /*
    309309       while(gp<32) gp =gp*2;
     
    409409{
    410410  if (bt->timesig != 0 && bt->counter == 0 && bt->flagstep == 0) {
    411     return 5168. / fvec_quadint (bt->acfout, bt->bp, 1);
     411    return 5168. / fvec_quadint (bt->acfout, bt->bp, 0);
    412412  } else {
    413413    return 0.;
Note: See TracChangeset for help on using the changeset viewer.