Changeset 5c4ec3c for src/pitch/pitchmcomb.c
- Timestamp:
- Oct 2, 2009, 1:19:10 AM (14 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:
- 38e9732
- Parents:
- 2f64b0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitch/pitchmcomb.c
r2f64b0e r5c4ec3c 99 99 newmag->data[i][j]=fftgrain->norm[i][j]; 100 100 /* detect only if local energy > 10. */ 101 //if ( vec_local_energy(newmag)>10.) {102 //hfc = vec_local_hfc(newmag); //not used101 //if (fvec_local_energy(newmag)>10.) { 102 //hfc = fvec_local_hfc(newmag); //not used 103 103 aubio_pitchmcomb_spectral_pp(p, newmag); 104 104 aubio_pitchmcomb_combdet(p,newmag); … … 132 132 newmag->data[i][j]=fftgrain->norm[i][j]; 133 133 /* detect only if local energy > 10. */ 134 if ( vec_local_energy(newmag)>10.) {135 /* hfc = vec_local_hfc(newmag); do not use */134 if (fvec_local_energy(newmag)>10.) { 135 /* hfc = fvec_local_hfc(newmag); do not use */ 136 136 aubio_pitchmcomb_spectral_pp(p, newmag); 137 137 aubio_pitchmcomb_combdet(p,newmag); … … 159 159 mag->data[i][j] = newmag->data[i][j]; 160 160 } 161 vec_dc_removal(mag); /* dc removal */162 vec_alpha_normalise(mag,p->alpha); /* alpha normalisation */161 fvec_dc_removal(mag); /* dc removal */ 162 fvec_alpha_normalise(mag,p->alpha); /* alpha normalisation */ 163 163 /* skipped */ /* low pass filtering */ 164 /** \bug vec_moving_thres may write out of bounds */165 vec_adapt_thres(mag,tmp,p->win_post,p->win_pre); /* adaptative threshold */166 vec_add(mag,-p->threshold); /* fixed threshold */164 /** \bug fvec_moving_thres may write out of bounds */ 165 fvec_adapt_thres(mag,tmp,p->win_post,p->win_pre); /* adaptative threshold */ 166 fvec_add(mag,-p->threshold); /* fixed threshold */ 167 167 { 168 168 aubio_spectralpeak_t * peaks = (aubio_spectralpeak_t *)p->peaks; … … 269 269 for (i=0;i<X->channels;i++) 270 270 for (j=1;j<X->length-1;j++) { 271 ispeak = vec_peakpick(X,j);271 ispeak = fvec_peakpick(X,j); 272 272 if (ispeak) { 273 273 count += ispeak; 274 274 spectral_peaks[count-1].bin = j; 275 spectral_peaks[count-1].ebin = vec_quadint(X, j, 1) - 1.;275 spectral_peaks[count-1].ebin = fvec_quadint(X, j, 1) - 1.; 276 276 } 277 277 }
Note: See TracChangeset
for help on using the changeset viewer.