Changeset 6352034
- Timestamp:
- Mar 11, 2017, 12:12:44 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:
- 04ebe31
- Parents:
- 2f99427
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
r2f99427 r6352034 47 47 uint_t last_onset; /**< last detected onset location, in frames */ 48 48 49 uint_t apply_compression; 50 smpl_t lambda_compression; 49 51 uint_t apply_adaptive_whitening; 50 52 aubio_spectral_whitening_t *spectral_whitening; … … 59 61 if (apply_filtering) { 60 62 } 61 if (apply_compression) {62 }63 63 */ 64 64 if (o->apply_adaptive_whitening) { 65 65 aubio_spectral_whitening_do(o->spectral_whitening, o->fftgrain); 66 } 67 if (o->apply_compression) { 68 cvec_logmag(o->fftgrain, o->apply_compression); 66 69 } 67 70 aubio_specdesc_do (o->od, o->fftgrain, o->desc); … … 260 263 aubio_onset_set_minioi_ms (o, 50.); 261 264 aubio_onset_set_silence (o, -70.); 262 aubio_onset_set_adaptive_whitening (o, 1); 265 aubio_onset_set_adaptive_whitening (o, 0); 266 267 o->apply_compression = 0; 268 o->lambda_compression = 1.; 263 269 264 270 /* method specific optimisations */ 265 271 if (strcmp (onset_mode, "energy") == 0) { 266 272 } else if (strcmp (onset_mode, "hfc") == 0 || strcmp (onset_mode, "default") == 0) { 273 aubio_onset_set_threshold (o, 0.058); 274 o->apply_compression = 1; 275 o->lambda_compression = 1.; 267 276 aubio_onset_set_adaptive_whitening (o, 0); 268 277 } else if (strcmp (onset_mode, "complexdomain") == 0 … … 270 279 aubio_onset_set_delay (o, 4.6 * o->hop_size); 271 280 aubio_onset_set_threshold (o, 0.15); 281 o->apply_compression = 1; 282 o->lambda_compression = 1.; 272 283 } else if (strcmp (onset_mode, "phase") == 0) { 284 o->apply_compression = 0; 273 285 aubio_onset_set_adaptive_whitening (o, 0); 274 286 } else if (strcmp (onset_mode, "mkl") == 0) {
Note: See TracChangeset
for help on using the changeset viewer.