Changeset c5c0c98 for src/pitch


Ignore:
Timestamp:
Sep 12, 2009, 12:08:54 AM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
fbe2cd2
Parents:
68a3fc9
Message:

src/mathutils.c: merge and fix vec_quadint_min and _max into simpler and more exact vec_quadint, use in src/pitch algorithms

Location:
src/pitch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchmcomb.c

    r68a3fc9 rc5c0c98  
    273273        count += ispeak;
    274274        spectral_peaks[count-1].bin = j;
    275         spectral_peaks[count-1].ebin = vec_quadint(X,j) - 1.;
     275        spectral_peaks[count-1].ebin = vec_quadint(X, j, 1) - 1.;
    276276      }
    277277    }
  • src/pitch/pitchyin.c

    r68a3fc9 rc5c0c98  
    107107    if(tau > 4 && (yin->data[c][period] < tol) &&
    108108        (yin->data[c][period] < yin->data[c][period+1])) {
    109       return vec_quadint_min(yin,period,1);
     109      return vec_quadint(yin,period,1);
    110110    }
    111111  }
    112   return vec_quadint_min(yin,vec_min_elem(yin),1);
     112  return vec_quadint(yin,vec_min_elem(yin),1);
    113113  //return 0;
    114114}
  • src/pitch/pitchyinfft.c

    r68a3fc9 rc5c0c98  
    129129    /* additional check for (unlikely) octave doubling in higher frequencies */
    130130    if (tau>35) {
    131       return vec_quadint_min(yin,tau,1);
     131      return vec_quadint(yin,tau,1);
    132132    } else {
    133133      /* should compare the minimum value of each interpolated peaks */
    134134      halfperiod = FLOOR(tau/2+.5);
    135135      if (yin->data[0][halfperiod] < tol)
    136         return vec_quadint_min(yin,halfperiod,1);
     136        return vec_quadint(yin,halfperiod,1);
    137137      else
    138         return vec_quadint_min(yin,tau,1);
     138        return vec_quadint(yin,tau,1);
    139139    }
    140140  } else
Note: See TracChangeset for help on using the changeset viewer.