Changeset 61316a6
- 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
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/aubionotes.c
r05773a2c r61316a6 46 46 isonset = aubio_peakpicker_do(parms, onset); 47 47 48 pitch = aubio_pitchdetection_do (pitchdet,ibuf); 48 aubio_pitchdetection_do (pitchdet, ibuf, pitch_obuf); 49 pitch = fvec_read_sample(pitch_obuf, 0, 0); 49 50 if(median){ 50 51 note_append(note_buffer, pitch); -
examples/utils.c
r05773a2c r61316a6 62 62 fvec_t *ibuf; 63 63 fvec_t *obuf; 64 fvec_t *pitch_obuf; 64 65 cvec_t *fftgrain; 65 66 fvec_t *woodblock; … … 319 320 pitchdet = new_aubio_pitchdetection (buffer_size * 4, 320 321 overlap_size, channels, samplerate, type_pitch, mode_pitch); 321 aubio_pitchdetection_set_yinthresh (pitchdet, 0.7); 322 aubio_pitchdetection_set_tolerance (pitchdet, 0.7); 323 pitch_obuf = new_fvec (1, channels); 322 324 323 325 if (median) { … … 350 352 del_fvec (note_buffer2); 351 353 } 354 del_fvec (pitch_obuf); 352 355 } 353 356 if (usedoubled) { -
examples/utils.h
r05773a2c r61316a6 95 95 extern fvec_t *ibuf; 96 96 extern fvec_t *obuf; 97 extern fvec_t *pitch_obuf; 97 98 extern cvec_t *fftgrain; 98 99 extern fvec_t *woodblock; -
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.