Changeset ad1df9b
- Timestamp:
- Apr 21, 2016, 7:03:58 PM (9 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:
- e9bd022
- Parents:
- 26a6af7
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
r26a6af7 rad1df9b 292 292 293 293 smpl_t 294 aubio_level_lin ( fvec_t * f)294 aubio_level_lin (const fvec_t * f) 295 295 { 296 296 smpl_t energy = 0.; … … 441 441 } 442 442 443 smpl_t fvec_quadratic_peak_pos ( fvec_t * x, uint_t pos) {443 smpl_t fvec_quadratic_peak_pos (const fvec_t * x, uint_t pos) { 444 444 smpl_t s0, s1, s2; uint_t x0, x2; 445 445 smpl_t half = .5, two = 2.; … … 466 466 } 467 467 468 uint_t fvec_peakpick( fvec_t * onset, uint_t pos) {468 uint_t fvec_peakpick(const fvec_t * onset, uint_t pos) { 469 469 uint_t tmp=0; 470 470 tmp = (onset->data[pos] > onset->data[pos-1] … … 553 553 554 554 smpl_t 555 aubio_db_spl ( fvec_t * o)555 aubio_db_spl (const fvec_t * o) 556 556 { 557 557 return 10. * LOG10 (aubio_level_lin (o)); … … 559 559 560 560 uint_t 561 aubio_silence_detection ( fvec_t * o, smpl_t threshold)561 aubio_silence_detection (const fvec_t * o, smpl_t threshold) 562 562 { 563 563 return (aubio_db_spl (o) < threshold); … … 599 599 600 600 void 601 aubio_autocorr ( fvec_t * input, fvec_t * output)601 aubio_autocorr (const fvec_t * input, fvec_t * output) 602 602 { 603 603 uint_t i, j, length = input->length; -
src/mathutils.h
r26a6af7 rad1df9b 251 251 252 252 */ 253 smpl_t fvec_quadratic_peak_pos ( fvec_t * x, uint_t p);253 smpl_t fvec_quadratic_peak_pos (const fvec_t * x, uint_t p); 254 254 255 255 /** finds magnitude of peak by quadratic interpolation … … 294 294 295 295 */ 296 uint_t fvec_peakpick ( fvec_t * v, uint_t p);296 uint_t fvec_peakpick (const fvec_t * v, uint_t p); 297 297 298 298 /** return 1 if a is a power of 2, 0 otherwise */ … … 308 308 309 309 */ 310 void aubio_autocorr ( fvec_t * input, fvec_t * output);310 void aubio_autocorr (const fvec_t * input, fvec_t * output); 311 311 312 312 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.