- Timestamp:
- Mar 27, 2017, 10:37:58 AM (8 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, sampler
- Children:
- dccfad2
- Parents:
- 25e0b0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
r25e0b0e r93579e5 76 76 isonset = 0; 77 77 } else { 78 // we have an onset 78 79 uint_t new_onset = o->total_frames + (uint_t)ROUND(isonset * o->hop_size); 80 // check if last onset time was more than minioi ago 79 81 if (o->last_onset + o->minioi < new_onset) { 80 //AUBIO_DBG ("accepted detection, marking as onset\n"); 81 o->last_onset = new_onset; 82 // start of file: make sure (new_onset - delay) >= 0 83 if (o->last_onset > 0 && o->delay > new_onset) { 84 isonset = 0; 85 } else { 86 //AUBIO_DBG ("accepted detection, marking as onset\n"); 87 o->last_onset = MAX(o->delay, new_onset); 88 } 82 89 } else { 83 90 //AUBIO_DBG ("doubled onset, not marking as onset\n");
Note: See TracChangeset
for help on using the changeset viewer.