- Timestamp:
- Apr 21, 2016, 7:09:47 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:
- 23493b5
- Parents:
- 55d1fa4
- Location:
- src/tempo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/beattracking.c
r55d1fa4 r69f74f0 124 124 125 125 void 126 aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframe,126 aubio_beattracking_do (aubio_beattracking_t * bt, const fvec_t * dfframe, 127 127 fvec_t * output) 128 128 { … … 410 410 411 411 smpl_t 412 aubio_beattracking_get_period ( aubio_beattracking_t * bt)412 aubio_beattracking_get_period (const aubio_beattracking_t * bt) 413 413 { 414 414 return bt->hop_size * bt->bp; … … 416 416 417 417 smpl_t 418 aubio_beattracking_get_period_s ( aubio_beattracking_t * bt)418 aubio_beattracking_get_period_s (const aubio_beattracking_t * bt) 419 419 { 420 420 return aubio_beattracking_get_period(bt) / (smpl_t) bt->samplerate; … … 422 422 423 423 smpl_t 424 aubio_beattracking_get_bpm ( aubio_beattracking_t * bt)424 aubio_beattracking_get_bpm (const aubio_beattracking_t * bt) 425 425 { 426 426 if (bt->bp != 0) { … … 432 432 433 433 smpl_t 434 aubio_beattracking_get_confidence ( aubio_beattracking_t * bt)434 aubio_beattracking_get_confidence (const aubio_beattracking_t * bt) 435 435 { 436 436 if (bt->gp) { -
src/tempo/beattracking.h
r55d1fa4 r69f74f0 65 65 66 66 */ 67 void aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframes,67 void aubio_beattracking_do (aubio_beattracking_t * bt, const fvec_t * dfframes, 68 68 fvec_t * out); 69 69 … … 76 76 77 77 */ 78 smpl_t aubio_beattracking_get_period ( aubio_beattracking_t * bt);78 smpl_t aubio_beattracking_get_period (const aubio_beattracking_t * bt); 79 79 80 80 /** get current beat period in seconds … … 86 86 87 87 */ 88 smpl_t aubio_beattracking_get_period_s ( aubio_beattracking_t * bt);88 smpl_t aubio_beattracking_get_period_s (const aubio_beattracking_t * bt); 89 89 90 90 /** get current tempo in bpm … … 96 96 97 97 */ 98 smpl_t aubio_beattracking_get_bpm( aubio_beattracking_t * bt);98 smpl_t aubio_beattracking_get_bpm(const aubio_beattracking_t * bt); 99 99 100 100 /** get current tempo confidence … … 106 106 107 107 */ 108 smpl_t aubio_beattracking_get_confidence( aubio_beattracking_t * bt);108 smpl_t aubio_beattracking_get_confidence(const aubio_beattracking_t * bt); 109 109 110 110 /** delete beat tracking object -
src/tempo/tempo.c
r55d1fa4 r69f74f0 55 55 56 56 /* execute tempo detection function on iput buffer */ 57 void aubio_tempo_do(aubio_tempo_t *o, fvec_t * input, fvec_t * tempo)57 void aubio_tempo_do(aubio_tempo_t *o, const fvec_t * input, fvec_t * tempo) 58 58 { 59 59 uint_t i; … … 164 164 165 165 /* Allocate memory for an tempo detection */ 166 aubio_tempo_t * new_aubio_tempo (c har_t * tempo_mode,166 aubio_tempo_t * new_aubio_tempo (const char_t * tempo_mode, 167 167 uint_t buf_size, uint_t hop_size, uint_t samplerate) 168 168 { -
src/tempo/tempo.h
r55d1fa4 r69f74f0 51 51 52 52 */ 53 aubio_tempo_t * new_aubio_tempo (c har_t * method,53 aubio_tempo_t * new_aubio_tempo (const char_t * method, 54 54 uint_t buf_size, uint_t hop_size, uint_t samplerate); 55 55 … … 61 61 62 62 */ 63 void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);63 void aubio_tempo_do (aubio_tempo_t *o, const fvec_t * input, fvec_t * tempo); 64 64 65 65 /** get the time of the latest beat detected, in samples
Note: See TracChangeset
for help on using the changeset viewer.