Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchmcomb.c

    rce3ff2b r5b41ef9  
    3232    uint_t length);
    3333uint_t aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks,
    34     const fvec_t * X);
    35 void aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, const fvec_t * oldmag);
    36 void aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, const fvec_t * newmag);
     34    fvec_t * X);
     35void aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, fvec_t * oldmag);
     36void aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, fvec_t * newmag);
    3737/* not used but useful : sort by amplitudes (or anything else)
    3838 * sort_pitchpeak(peaks, length);
     
    4343void aubio_pitchmcomb_sort_peak (aubio_spectralpeak_t * peaks, uint_t nbins);
    4444/** select the best candidates */
    45 uint_t aubio_pitch_cands (aubio_pitchmcomb_t * p, const cvec_t * fftgrain,
     45uint_t aubio_pitch_cands (aubio_pitchmcomb_t * p, cvec_t * fftgrain,
    4646    smpl_t * cands);
    4747
     
    102102
    103103void
    104 aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, const cvec_t * fftgrain, fvec_t * output)
     104aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, cvec_t * fftgrain, fvec_t * output)
    105105{
    106106  uint_t j;
     
    135135
    136136uint_t
    137 aubio_pitch_cands (aubio_pitchmcomb_t * p, const cvec_t * fftgrain, smpl_t * cands)
     137aubio_pitch_cands (aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands)
    138138{
    139139  uint_t j;
     
    166166
    167167void
    168 aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, const fvec_t * newmag)
     168aubio_pitchmcomb_spectral_pp (aubio_pitchmcomb_t * p, fvec_t * newmag)
    169169{
    170170  fvec_t *mag = (fvec_t *) p->scratch;
     
    198198
    199199void
    200 aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, const fvec_t * newmag)
     200aubio_pitchmcomb_combdet (aubio_pitchmcomb_t * p, fvec_t * newmag)
    201201{
    202202  aubio_spectralpeak_t *peaks = (aubio_spectralpeak_t *) p->peaks;
     
    286286 */
    287287uint_t
    288 aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks, const fvec_t * X)
     288aubio_pitchmcomb_quadpick (aubio_spectralpeak_t * spectral_peaks, fvec_t * X)
    289289{
    290290  uint_t j, ispeak, count = 0;
     
    336336  uint_t run = 0;
    337337  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++) {
    339340      if (candidates[run]->ene > candidates[cur]->ene)
    340341        CAND_SWAP (candidates[run], candidates[cur]);
     
    351352  uint_t run = 0;
    352353  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++) {
    354356      if (candidates[run]->ebin < candidates[cur]->ebin)
    355357        CAND_SWAP (candidates[run], candidates[cur]);
     
    365367  uint_t i, j;
    366368  uint_t spec_size;
    367   p->spec_partition = 2;
     369  p->spec_partition = 4;
    368370  p->ncand = 5;
    369371  p->npartials = 5;
     
    377379  p->phasefreq = bufsize / hopsize / TWO_PI;
    378380  p->phasediff = TWO_PI * hopsize / bufsize;
    379   spec_size = bufsize / p->spec_partition + 1;
     381  spec_size = bufsize / p->spec_partition;
    380382  //p->pickerfn = quadpick;
    381383  //p->biquad = new_biquad(0.1600,0.3200,0.1600, -0.5949, 0.2348);
Note: See TracChangeset for help on using the changeset viewer.