Ignore:
Timestamp:
Oct 6, 2009, 5:06:30 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:
9facc27
Parents:
a9e27e4
Message:

examples/aubioonset.c: use interpolated onset position

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioonset.c

    ra9e27e4 r19f1dc9  
    4444        onset->data[0][0] *= onset2->data[0][0];
    4545      }
    46       isonset = aubio_peakpick_pimrt(onset,parms);
     46      isonset = aubio_peakpicker_do(parms, onset);
    4747      if (isonset) {
    4848        /* test for silence */
    4949        if (aubio_silence_detection(ibuf, silence)==1)
    50           isonset=0;
     50          isonset=0.;
    5151        else
    5252          for (pos = 0; pos < overlap_size; pos++){
     
    7272      if (isonset && output_filename == NULL) {
    7373        if(frames >= 4) {
    74           outmsg("%f\n",(frames-frames_delay)*overlap_size/(float)samplerate);
     74          outmsg("%f\n",(frames - frames_delay + isonset)*overlap_size/(float)samplerate);
    7575        } else if (frames < frames_delay) {
    7676          outmsg("%f\n",0.);
     
    8080
    8181int main(int argc, char **argv) {
    82   frames_delay = 4;
     82  frames_delay = 3;
    8383  examples_common_init(argc,argv);
    8484  examples_common_process(aubio_process,process_print);
Note: See TracChangeset for help on using the changeset viewer.