Changeset 0f6f2e6


Ignore:
Timestamp:
Oct 5, 2009, 7:40:45 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:
998a8be
Parents:
eebb0e1
Message:

src/onset/peakpick.c: use quadint in peakpick to get interpolated peak position, real in the range [0,2] in number of hop size

Location:
src/onset
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    reebb0e1 r0f6f2e6  
    5252  }*/
    5353  isonset = aubio_peakpick_pimrt(o->of,o->pp);
    54   if (isonset) {
     54  if (isonset > 0.) {
    5555    if (aubio_silence_detection(input, o->silence)==1) {
    5656      isonset  = 0;
  • src/onset/peakpick.c

    reebb0e1 r0f6f2e6  
    6868 * is slightly more permissive than the offline one, and yelds to an increase
    6969 * of false positives. best  */
    70 uint_t aubio_peakpick_pimrt(fvec_t * onset,  aubio_pickpeak_t * p) {
     70smpl_t aubio_peakpick_pimrt(fvec_t * onset,  aubio_pickpeak_t * p) {
    7171        fvec_t * onset_keep = (fvec_t *)p->onset_keep;
    7272        fvec_t * onset_proc = (fvec_t *)p->onset_proc;
     
    7474        fvec_t * scratch    = (fvec_t *)p->scratch;
    7575        smpl_t mean = 0., median = 0.;
     76  smpl_t isonset = 0.;
    7677        uint_t length = p->win_post + p->win_pre + 1;
    7778        uint_t i = 0, j;
     
    110111        /* } */
    111112        //AUBIO_DBG("%f\n", onset_peek->data[0][2]);
    112         return (p->pickerfn)(onset_peek,1);
     113  isonset = (p->pickerfn)(onset_peek,1);
     114  if (isonset) { //(isonset) {
     115    isonset = fvec_quadint(onset_peek, 1, 1);
     116  }
     117        return isonset;
    113118}
    114119
  • src/onset/peakpick.h

    reebb0e1 r0f6f2e6  
    4141aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold);
    4242/** real time peak picking function */
    43 uint_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p);
     43smpl_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p);
    4444/** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
    4545uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval );
Note: See TracChangeset for help on using the changeset viewer.