- Timestamp:
- Nov 5, 2009, 11:18:30 PM (15 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:
- 16ed726
- Parents:
- 6e57c2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/tempo.c
r6e57c2e re5b9a46 40 40 fvec_t * out; /** beat tactus candidates */ 41 41 fvec_t * onset; /** onset results */ 42 fvec_t * peek; /** thresholded onset function */43 42 smpl_t silence; /** silence parameter */ 44 43 smpl_t threshold; /** peak picking threshold */ … … 55 54 uint_t winlen = o->winlen; 56 55 uint_t step = o->step; 56 fvec_t * thresholded; 57 57 aubio_pvoc_do (o->pv, input, o->fftgrain); 58 58 aubio_specdesc_do (o->od, o->fftgrain, o->of); … … 75 75 aubio_peakpicker_do (o->pp, o->of, o->onset); 76 76 tempo->data[0][1] = o->onset->data[0][0]; 77 o->dfframe->data[0][winlen - step + o->blockpos] =78 aubio_peakpicker_get_thresholded_input(o->pp);77 thresholded = aubio_peakpicker_get_thresholded_input(o->pp); 78 o->dfframe->data[0][winlen - step + o->blockpos] = thresholded->data[0][0]; 79 79 /* end of second level loop */ 80 80 tempo->data[0][0] = 0; /* reset tactus */ … … 83 83 /* if current frame is a predicted tactus */ 84 84 if (o->blockpos == FLOOR(o->out->data[0][i])) { 85 tempo->data[0][0] = 1. +o->out->data[0][i] - FLOOR(o->out->data[0][i]); /* set tactus */85 tempo->data[0][0] = o->out->data[0][i] - FLOOR(o->out->data[0][i]); /* set tactus */ 86 86 /* test for silence */ 87 87 if (aubio_silence_detection(input, o->silence)==1) { … … 125 125 o->bt = new_aubio_beattracking(o->winlen,channels); 126 126 o->onset = new_fvec(1, channels); 127 o->peek = new_fvec(3, channels);128 127 /*if (usedoubled) { 129 128 o2 = new_aubio_specdesc(type_onset2,buffer_size,channels); … … 152 151 del_fvec(o->dfframe); 153 152 del_fvec(o->onset); 154 del_fvec(o->peek);155 153 AUBIO_FREE(o); 156 154 return;
Note: See TracChangeset
for help on using the changeset viewer.