- Timestamp:
- Apr 2, 2005, 3:29:23 PM (20 years ago)
- 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
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
re50b695 ra0fd4e4 401 401 return loudness; 402 402 } 403 404 void 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 -
src/mathutils.h
re50b695 ra0fd4e4 236 236 uint_t aubio_silence_detection(fvec_t * ibuf, smpl_t threshold); 237 237 smpl_t aubio_level_detection(fvec_t * ibuf, smpl_t threshold); 238 /** 239 * calculate normalised autocorrelation function 240 */ 241 void aubio_autocorr(fvec_t * input, fvec_t * output); 238 242 239 243 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.