From: Paul Brossier Date: Thu, 20 Apr 2006 12:49:06 +0000 (+0000) Subject: mcomb: bypass hack for high freqs, use instfreq rather than interp X-Git-Tag: bzr2git~712 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e47ade3a8ec171fb24a7b38126070851c81ca599;p=aubio.git mcomb: bypass hack for high freqs, use instfreq rather than interp mcomb: bypass hack for high freqs, use instfreq rather than interp --- diff --git a/src/pitchmcomb.c b/src/pitchmcomb.c index 06434a2f..2b5fe20f 100644 --- a/src/pitchmcomb.c +++ b/src/pitchmcomb.c @@ -111,6 +111,7 @@ smpl_t aubio_pitchmcomb_detect(aubio_pitchmcomb_t * p, cvec_t * fftgrain) { for (j=0; j< p->theta->length; j++) { p->theta->data[i][j]=fftgrain->phas[i][j]; } + //return p->candidates[p->goodcandidate]->ebin; return FLOOR(p->candidates[p->goodcandidate]->ebin+.5) + instfreq; /*} else { return -1.; @@ -202,6 +203,9 @@ void aubio_pitchmcomb_combdet(aubio_pitchmcomb_t * p, fvec_t * newmag) { /* get the biggest peak in the spectrum */ root_peak = aubio_pitchmcomb_get_root_peak(peaks,count); + /* not enough partials in highest notes, could be forced */ + //if (peaks[root_peak].ebin >= aubio_miditofreq(85.)/p->tau) N=2; + //if (peaks[root_peak].ebin >= aubio_miditofreq(90.)/p->tau) N=1; /* now calculate the energy of each of the 5 combs */ for (l=0;l