From dccfad214fef00c5c974f6fe1560c0fd3f928fa9 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 27 Mar 2017 11:02:07 +0200 Subject: [PATCH] src/onset/onset.c: improve specflux parameters MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Experiments using Sebastian Böck database of 27770 onsets (1h42m) [1], showed that adding compression and adaptive-whitening always out-performs the raw spectral flux function. Using shorter windows affects overall results, but decreases the delay. With the following parameters: threshold=0.05 win_s=2048 hop_s=1024 novelty=specflux delay_ms=26.6 Strict accuracy / onset: F 75.184 | P 82.478 | R 69.075 | F3 70.216 mir_eval accuracy / file: F 73.749 | P 81.078 | R 71.662 | F3 72.504 Deviation (ms) δ -0.314 | σ 15.396 | δ. 10.89 | σ. 10.88 Total onsets in database: # 27770 | OK 19182 | FP 4075 | threshold=0.18 win_s=512 hop_s=256 novelty=specflux delay_ms=13.3 Strict accuracy / onset: F 73.200 | P 74.419 | R 72.020 | F3 72.253 mir_eval accuracy / file: F 71.674 | P 76.937 | R 73.973 | F3 74.259 Deviation (ms) δ -0.576 | σ 17.521 | δ. 13.44 | σ. 11.25 Total onsets in database: # 27770 | OK 20000 | FP 6875 | Note that, unlike in [1], onsets are not combined before evaluation. [1] Evaluating the online capabilities of onset detection methods, Sebastian Böck, Florian Krebs and Markus Schedl (ISMIR 2012) http://www.cp.jku.at/research/papers/Boeck_etal_ISMIR_2012.pdf --- src/onset/onset.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/onset/onset.c b/src/onset/onset.c index 1e93a7e7..0c1ee99f 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -316,9 +316,11 @@ uint_t aubio_onset_set_default_parameters (aubio_onset_t * o, const char_t * ons 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.25); + aubio_onset_set_threshold (o, 0.18); aubio_onset_set_awhitening(o, 1); - aubio_onset_set_compression (o, 20.); + aubio_spectral_whitening_set_relax_time(o->spectral_whitening, 100); + aubio_spectral_whitening_set_floor(o->spectral_whitening, 1.); + aubio_onset_set_compression (o, 10.); } else if (strcmp (onset_mode, "specdiff") == 0) { } else { AUBIO_WRN("onset: unknown spectral descriptor type %s, " -- 2.11.0