Changeset a0fd4e4 for src/mathutils.c


Ignore:
Timestamp:
Apr 2, 2005, 3:29:23 PM (19 years ago)
Author:
Paul Brossier <piem@altern.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:
cf7c76a
Parents:
e50b695
Message:

merge aubionotes and aubionotesmedian

add make_audio_plot to gnuplot.py
adds autocorrelation to mathutils
adds Makefile.in to junk files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    re50b695 ra0fd4e4  
    401401      return loudness;
    402402}
     403
     404void aubio_autocorr(fvec_t * input, fvec_t * output){
     405        uint_t i = 0, j = 0, length = input->length;
     406        smpl_t * data = input->data[0];
     407        smpl_t * acf = output->data[0];
     408        smpl_t tmp =0.;
     409        for(i=0;i<length;i++){
     410                for(j=i;j<length;j++){
     411                        tmp += data[j-i]*data[j];
     412                }
     413                acf[i] = tmp/(length-i);
     414                tmp = 0.0;
     415        }
     416}
     417
Note: See TracChangeset for help on using the changeset viewer.