Changeset ffa8607 for src/tempo


Ignore:
Timestamp:
Nov 25, 2013, 11:26:48 PM (11 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:
18f14f9
Parents:
fda4fd7
Message:

src/tempo/beattracking.c: fix rayleigh period clamping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tempo/beattracking.c

    rfda4fd7 rffa8607  
    171171  /* find non-zero Rayleigh period */
    172172  maxindex = fvec_max_elem (bt->acfout);
    173   bt->rp = maxindex ? fvec_quadratic_peak_pos (bt->acfout, maxindex) : 1;
    174   //rp = (maxindex==127) ? 43 : maxindex; //rayparam
    175   bt->rp = (maxindex == bt->acfout->length - 1) ? bt->rayparam : maxindex;      //rayparam
     173  if (maxindex > 0 && maxindex < bt->acfout->length - 1) {
     174    bt->rp = fvec_quadratic_peak_pos (bt->acfout, maxindex);
     175  } else {
     176    bt->rp = bt->rayparam;
     177  }
    176178
    177179  /* activate biased filterbank */
Note: See TracChangeset for help on using the changeset viewer.