Changeset 61316a6 for plugins


Ignore:
Timestamp:
Oct 8, 2009, 8:54:49 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:
3027c6e
Parents:
05773a2c
Message:

examples plugins: update to latest pitch prototypes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/puredata/aubiopitch~.c

    r05773a2c r61316a6  
    3131        aubio_pitchdetection_t *o;
    3232        fvec_t *vec;
     33        fvec_t *pitchvec;
    3334        t_outlet *pitch;
    3435} t_aubiopitch_tilde;
     
    4041        int n                 = (int)(w[3]);
    4142        int j;
    42         smpl_t pitch;
    4343        for (j=0;j<n;j++) {
    4444                /* write input to datanew */
     
    4747                if (x->pos == x->hopsize-1) {         
    4848                        /* block loop */
    49                         pitch = aubio_pitchdetection(x->o,x->vec);
    50                         outlet_float(x->pitch, pitch);
     49                        aubio_pitchdetection_do(x->o,x->vec, x->pitchvec);
     50                        outlet_float(x->pitch, x->pitchvec->data[0][0]);
    5151                        /* end of block loop */
    5252                        x->pos = -1; /* so it will be zero next j loop */
     
    9696        x->o = new_aubio_pitchdetection(x->bufsize,
    9797                    x->hopsize, 1, 44100., type_pitch, mode_pitch);
    98         aubio_pitchdetection_set_yinthresh(x->o, 0.7);
     98        aubio_pitchdetection_set_tolerance (x->o, 0.7);
    9999        x->vec = (fvec_t *)new_fvec(x->hopsize,1);
     100        x->pitchvec = (fvec_t *)new_fvec(1,1);
    100101
    101102        //floatinlet_new (&x->x_obj, &x->threshold);
     
    110111        del_aubio_pitchdetection(x->o);
    111112        del_fvec(x->vec);
     113        del_fvec(x->pitchvec);
    112114        return 0;
    113115}
Note: See TracChangeset for help on using the changeset viewer.