Changeset f8714ee
- Timestamp:
- May 28, 2005, 1:56:41 AM (20 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:
- f88a326
- Parents:
- 0c20582
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitchdetection.c
r0c20582 rf8714ee 90 90 smpl_t aubio_pitchdetection(aubio_pitchdetection_t *p, fvec_t * ibuf) { 91 91 smpl_t pitch = 0.; 92 uint_t i,j = 0 ;92 uint_t i,j = 0, overlap_size = 0; 93 93 switch(p->type) { 94 94 case aubio_yin: 95 overlap_size = p->buf->length-ibuf->length; 95 96 /* do sliding window blocking */ 96 97 for (i=0;i<p->buf->channels;i++){ 97 for (j=0;j<p->buf->length-ibuf->length;j++){ 98 p->buf->data[i][j] = p->buf->data[i][j+ibuf->length]; 98 for (j=0;j<overlap_size;j++){ 99 p->buf->data[i][j] = 100 p->buf->data[i][j+ibuf->length]; 99 101 } 100 102 } 101 103 for (i=0;i<ibuf->channels;i++){ 102 104 for (j=0;j<ibuf->length;j++){ 103 p->buf->data[i][j] = ibuf->data[i][j]; 105 p->buf->data[i][j+overlap_size] = 106 ibuf->data[i][j]; 104 107 } 105 108 } -
src/pitchyin.c
r0c20582 rf8714ee 91 91 uint_t aubio_pitchyin_getpitchfast(fvec_t * input, fvec_t * yin, smpl_t tol){ 92 92 uint_t c=0,j,tau = 0; 93 smpl_t tmp = 0 , tmp2;93 smpl_t tmp = 0; 94 94 for (tau=0;tau<yin->length;tau++) 95 95 { … … 104 104 } 105 105 } 106 tmp2 = 0.;107 106 yin->data[c][0] = 1.; 107 tmp = 0.; 108 108 for (tau=1;tau<yin->length;tau++) 109 109 {
Note: See TracChangeset
for help on using the changeset viewer.