From bd973b052ad95d0c611a05d336e43831a52799cd Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 26 Mar 2017 17:49:11 +0200 Subject: [PATCH] src/onset/onset.c: improve default parameters --- src/onset/onset.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/onset/onset.c b/src/onset/onset.c index 111ae296..5961c721 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -295,17 +295,23 @@ uint_t aubio_onset_set_default_parameters (aubio_onset_t * o, const char_t * ons || strcmp (onset_mode, "complex") == 0) { aubio_onset_set_delay (o, 4.6 * o->hop_size); aubio_onset_set_threshold (o, 0.15); - o->apply_compression = 1; - o->lambda_compression = 1.; + aubio_onset_set_awhitening(o, 1); + aubio_onset_set_compression (o, 1.); } else if (strcmp (onset_mode, "phase") == 0) { o->apply_compression = 0; - aubio_onset_set_adaptive_whitening (o, 0); + aubio_onset_set_awhitening (o, 0); } else if (strcmp (onset_mode, "mkl") == 0) { aubio_onset_set_threshold (o, 0.05); + aubio_onset_set_awhitening(o, 1); + aubio_onset_set_compression (o, 0.02); } else if (strcmp (onset_mode, "kl") == 0) { aubio_onset_set_threshold (o, 0.35); + aubio_onset_set_awhitening(o, 1); + aubio_onset_set_compression (o, 0.02); } else if (strcmp (onset_mode, "specflux") == 0) { - aubio_onset_set_threshold (o, 0.4); + aubio_onset_set_threshold (o, 0.25); + aubio_onset_set_awhitening(o, 1); + aubio_onset_set_compression (o, 20.); } else if (strcmp (onset_mode, "specdiff") == 0) { } else { AUBIO_WRN("onset: unknown spectral descriptor type %s, " -- 2.11.0