Changeset 5c4ec3c for src/pitch


Ignore:
Timestamp:
Oct 2, 2009, 1:19:10 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:
38e9732
Parents:
2f64b0e
Message:

src/mathutils.{c,h}: rename all vec_ to fvec_

Location:
src/pitch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchmcomb.c

    r2f64b0e r5c4ec3c  
    9999    newmag->data[i][j]=fftgrain->norm[i][j];
    100100  /* detect only if local energy > 10. */
    101   //if (vec_local_energy(newmag)>10.) {
    102     //hfc = vec_local_hfc(newmag); //not used
     101  //if (fvec_local_energy(newmag)>10.) {
     102    //hfc = fvec_local_hfc(newmag); //not used
    103103    aubio_pitchmcomb_spectral_pp(p, newmag);
    104104    aubio_pitchmcomb_combdet(p,newmag);
     
    132132    newmag->data[i][j]=fftgrain->norm[i][j];
    133133  /* detect only if local energy > 10. */
    134   if (vec_local_energy(newmag)>10.) {
    135     /* hfc = vec_local_hfc(newmag); do not use */
     134  if (fvec_local_energy(newmag)>10.) {
     135    /* hfc = fvec_local_hfc(newmag); do not use */
    136136    aubio_pitchmcomb_spectral_pp(p, newmag);
    137137    aubio_pitchmcomb_combdet(p,newmag);
     
    159159    mag->data[i][j] = newmag->data[i][j];
    160160  }
    161   vec_dc_removal(mag);               /* dc removal           */
    162   vec_alpha_normalise(mag,p->alpha); /* alpha normalisation  */
     161  fvec_dc_removal(mag);               /* dc removal           */
     162  fvec_alpha_normalise(mag,p->alpha); /* alpha normalisation  */
    163163  /* skipped */                      /* low pass filtering   */
    164   /** \bug vec_moving_thres may write out of bounds */
    165   vec_adapt_thres(mag,tmp,p->win_post,p->win_pre); /* adaptative threshold */
    166   vec_add(mag,-p->threshold);        /* fixed threshold      */
     164  /** \bug fvec_moving_thres may write out of bounds */
     165  fvec_adapt_thres(mag,tmp,p->win_post,p->win_pre); /* adaptative threshold */
     166  fvec_add(mag,-p->threshold);        /* fixed threshold      */
    167167  {
    168168    aubio_spectralpeak_t * peaks = (aubio_spectralpeak_t *)p->peaks;
     
    269269  for (i=0;i<X->channels;i++)
    270270    for (j=1;j<X->length-1;j++) {
    271       ispeak = vec_peakpick(X,j);
     271      ispeak = fvec_peakpick(X,j);
    272272      if (ispeak) {
    273273        count += ispeak;
    274274        spectral_peaks[count-1].bin = j;
    275         spectral_peaks[count-1].ebin = vec_quadint(X, j, 1) - 1.;
     275        spectral_peaks[count-1].ebin = fvec_quadint(X, j, 1) - 1.;
    276276      }
    277277    }
  • src/pitch/pitchyin.c

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

    r2f64b0e r5c4ec3c  
    125125    //return tau;
    126126    /* 3 point quadratic interpolation */
    127     //return vec_quadint_min(yin,tau,1);
     127    //return fvec_quadint_min(yin,tau,1);
    128128    /* additional check for (unlikely) octave doubling in higher frequencies */
    129129    if (tau>35) {
    130       return vec_quadint(yin,tau,1);
     130      return fvec_quadint(yin,tau,1);
    131131    } else {
    132132      /* should compare the minimum value of each interpolated peaks */
    133133      halfperiod = FLOOR(tau/2+.5);
    134134      if (yin->data[0][halfperiod] < tol)
    135         return vec_quadint(yin,halfperiod,1);
     135        return fvec_quadint(yin,halfperiod,1);
    136136      else
    137         return vec_quadint(yin,tau,1);
     137        return fvec_quadint(yin,tau,1);
    138138    }
    139139  } else
Note: See TracChangeset for help on using the changeset viewer.