- Timestamp:
- Oct 18, 2009, 3:08:59 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:
- e5f49af
- Parents:
- 74516f7
- Location:
- src/pitch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitch/pitchmcomb.c
r74516f7 r56ef7e1 167 167 /* skipped */ /* low pass filtering */ 168 168 /** \bug fvec_moving_thres may write out of bounds */ 169 fvec_adapt_thres(mag,tmp,p->win_post,p->win_pre ); /* adaptative threshold */169 fvec_adapt_thres(mag,tmp,p->win_post,p->win_pre,i); /* adaptative threshold */ 170 170 fvec_add(mag,-p->threshold); /* fixed threshold */ 171 171 { … … 277 277 count += ispeak; 278 278 spectral_peaks[count-1].bin = j; 279 spectral_peaks[count-1].ebin = fvec_quadint(X, j, 1) - 1.;279 spectral_peaks[count-1].ebin = fvec_quadint(X, j, i) - 1.; 280 280 } 281 281 } -
src/pitch/pitchyin.c
r74516f7 r56ef7e1 149 149 if(tau > 4 && (yin->data[c][period] < tol) && 150 150 (yin->data[c][period] < yin->data[c][period+1])) { 151 out->data[c][0] = fvec_quadint(yin,period, 1);151 out->data[c][0] = fvec_quadint(yin,period,c); 152 152 goto beach; 153 153 } 154 154 } 155 out->data[c][0] = fvec_quadint(yin,fvec_min_elem(yin), 1);155 out->data[c][0] = fvec_quadint(yin,fvec_min_elem(yin),c); 156 156 beach: 157 157 continue; -
src/pitch/pitchyinfft.c
r74516f7 r56ef7e1 132 132 /* additional check for (unlikely) octave doubling in higher frequencies */ 133 133 if (tau>35) { 134 output->data[i][0] = fvec_quadint(yin,tau, 1);134 output->data[i][0] = fvec_quadint(yin,tau,i); 135 135 } else { 136 136 /* should compare the minimum value of each interpolated peaks */ 137 137 halfperiod = FLOOR(tau/2+.5); 138 138 if (yin->data[0][halfperiod] < p->tol) 139 output->data[i][0] = fvec_quadint(yin,halfperiod, 1);139 output->data[i][0] = fvec_quadint(yin,halfperiod,i); 140 140 else 141 output->data[i][0] = fvec_quadint(yin,tau, 1);141 output->data[i][0] = fvec_quadint(yin,tau,i); 142 142 } 143 143 } else {
Note: See TracChangeset
for help on using the changeset viewer.