- Timestamp:
- Oct 8, 2009, 8:54:49 PM (15 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/puredata/aubiopitch~.c
r05773a2c r61316a6 31 31 aubio_pitchdetection_t *o; 32 32 fvec_t *vec; 33 fvec_t *pitchvec; 33 34 t_outlet *pitch; 34 35 } t_aubiopitch_tilde; … … 40 41 int n = (int)(w[3]); 41 42 int j; 42 smpl_t pitch;43 43 for (j=0;j<n;j++) { 44 44 /* write input to datanew */ … … 47 47 if (x->pos == x->hopsize-1) { 48 48 /* 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]); 51 51 /* end of block loop */ 52 52 x->pos = -1; /* so it will be zero next j loop */ … … 96 96 x->o = new_aubio_pitchdetection(x->bufsize, 97 97 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); 99 99 x->vec = (fvec_t *)new_fvec(x->hopsize,1); 100 x->pitchvec = (fvec_t *)new_fvec(1,1); 100 101 101 102 //floatinlet_new (&x->x_obj, &x->threshold); … … 110 111 del_aubio_pitchdetection(x->o); 111 112 del_fvec(x->vec); 113 del_fvec(x->pitchvec); 112 114 return 0; 113 115 }
Note: See TracChangeset
for help on using the changeset viewer.