Changes in src/pitch/pitchmcomb.c [ce3ff2b:5b41ef9]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/pitch/pitchmcomb.c
rce3ff2b r5b41ef9 32 32 uint_t length); 33 33 uint_t aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks, 34 constfvec_t * X);35 void aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, constfvec_t * oldmag);36 void aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, constfvec_t * newmag);34 fvec_t * X); 35 void aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, fvec_t * oldmag); 36 void aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, fvec_t * newmag); 37 37 /* not used but useful : sort by amplitudes (or anything else) 38 38 * sort_pitchpeak(peaks, length); … … 43 43 void aubio_pitchmcomb_sort_peak (aubio_spectralpeak_t * peaks, uint_t nbins); 44 44 /** select the best candidates */ 45 uint_t aubio_pitch_cands (aubio_pitchmcomb_t * p, c onst cvec_t * fftgrain,45 uint_t aubio_pitch_cands (aubio_pitchmcomb_t * p, cvec_t * fftgrain, 46 46 smpl_t * cands); 47 47 … … 102 102 103 103 void 104 aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, c onst cvec_t * fftgrain, fvec_t * output)104 aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, cvec_t * fftgrain, fvec_t * output) 105 105 { 106 106 uint_t j; … … 135 135 136 136 uint_t 137 aubio_pitch_cands (aubio_pitchmcomb_t * p, c onst cvec_t * fftgrain, smpl_t * cands)137 aubio_pitch_cands (aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands) 138 138 { 139 139 uint_t j; … … 166 166 167 167 void 168 aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, constfvec_t * newmag)168 aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, fvec_t * newmag) 169 169 { 170 170 fvec_t *mag = (fvec_t *) p->scratch; … … 198 198 199 199 void 200 aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, constfvec_t * newmag)200 aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, fvec_t * newmag) 201 201 { 202 202 aubio_spectralpeak_t *peaks = (aubio_spectralpeak_t *) p->peaks; … … 286 286 */ 287 287 uint_t 288 aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks, constfvec_t * X)288 aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks, fvec_t * X) 289 289 { 290 290 uint_t j, ispeak, count = 0; … … 336 336 uint_t run = 0; 337 337 for (cur = 0; cur < nbins; cur++) { 338 for (run = cur + 1; run < nbins; run++) { 338 run = cur + 1; 339 for (run = cur; run < nbins; run++) { 339 340 if (candidates[run]->ene > candidates[cur]->ene) 340 341 CAND_SWAP (candidates[run], candidates[cur]); … … 351 352 uint_t run = 0; 352 353 for (cur = 0; cur < nbins; cur++) { 353 for (run = cur + 1; run < nbins; run++) { 354 run = cur + 1; 355 for (run = cur; run < nbins; run++) { 354 356 if (candidates[run]->ebin < candidates[cur]->ebin) 355 357 CAND_SWAP (candidates[run], candidates[cur]); … … 365 367 uint_t i, j; 366 368 uint_t spec_size; 367 p->spec_partition = 2;369 p->spec_partition = 4; 368 370 p->ncand = 5; 369 371 p->npartials = 5; … … 377 379 p->phasefreq = bufsize / hopsize / TWO_PI; 378 380 p->phasediff = TWO_PI * hopsize / bufsize; 379 spec_size = bufsize / p->spec_partition + 1;381 spec_size = bufsize / p->spec_partition; 380 382 //p->pickerfn = quadpick; 381 383 //p->biquad = new_biquad(0.1600,0.3200,0.1600, -0.5949, 0.2348);
Note: See TracChangeset
for help on using the changeset viewer.