- Timestamp:
- Dec 31, 2013, 12:20:28 AM (11 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:
- 5644069
- Parents:
- fe87823
- Location:
- src/pitch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitch/pitch.c
rfe87823 rc21acb9 367 367 aubio_pitch_do_specacf (aubio_pitch_t * p, fvec_t * ibuf, fvec_t * out) 368 368 { 369 smpl_t pitch = 0., period; 369 370 aubio_pitch_slideblock (p, ibuf); 370 371 aubio_pitchspecacf_do (p->p_object, p->buf, out); 371 372 //out->data[0] = aubio_bintofreq (out->data[0], p->samplerate, p->bufsize); 372 smpl_t pitch = 0.,period = out->data[0];373 period = out->data[0]; 373 374 if (period > 0) { 374 375 pitch = p->samplerate / period; -
src/pitch/pitchspecacf.c
rfe87823 rc21acb9 57 57 aubio_pitchspecacf_do (aubio_pitchspecacf_t * p, fvec_t * input, fvec_t * output) 58 58 { 59 uint_t l ;59 uint_t l, tau; 60 60 fvec_t *fftout = p->fftout; 61 61 // window the input … … 75 75 } 76 76 // get the minimum 77 uint_ttau = fvec_min_elem (p->acf);77 tau = fvec_min_elem (p->acf); 78 78 // get the interpolated minimum 79 79 output->data[0] = fvec_quadratic_peak_pos (p->acf, tau) * 2.; -
src/pitch/pitchyinfft.c
rfe87823 rc21acb9 58 58 new_aubio_pitchyinfft (uint_t samplerate, uint_t bufsize) 59 59 { 60 uint_t i = 0, j = 1; 61 smpl_t freq = 0, a0 = 0, a1 = 0, f0 = 0, f1 = 0; 60 62 aubio_pitchyinfft_t *p = AUBIO_NEW (aubio_pitchyinfft_t); 61 63 p->winput = new_fvec (bufsize); … … 67 69 p->win = new_aubio_window ("hanningz", bufsize); 68 70 p->weight = new_fvec (bufsize / 2 + 1); 69 uint_t i = 0, j = 1;70 smpl_t freq = 0, a0 = 0, a1 = 0, f0 = 0, f1 = 0;71 71 for (i = 0; i < p->weight->length; i++) { 72 72 freq = (smpl_t) i / (smpl_t) bufsize *(smpl_t) samplerate;
Note: See TracChangeset
for help on using the changeset viewer.