Changeset 19f1dc9


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

Location:
examples
Files:
3 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);
  • examples/utils.c

    ra9e27e4 r19f1dc9  
    6868fvec_t *onset;
    6969fvec_t *onset2;
    70 int isonset = 0;
     70smpl_t isonset = 0;
    7171aubio_pickpeak_t *parms;
    7272
  • examples/utils.h

    ra9e27e4 r19f1dc9  
    101101extern fvec_t *onset;
    102102extern fvec_t *onset2;
    103 extern int isonset;
     103extern smpl_t isonset;
    104104extern aubio_pickpeak_t *parms;
    105105
Note: See TracChangeset for help on using the changeset viewer.