From 862d78f7adbe1541ea6b183bd18995a70b347914 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 21 Nov 2007 12:02:28 +0100 Subject: [PATCH] utils.c, utils.py: add specflux onset function --- examples/utils.c | 2 ++ python/aubio/task/utils.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/utils.c b/examples/utils.c index bcdf5c18..484a02c2 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -173,6 +173,8 @@ int parse_args (int argc, char **argv) { type_onset = aubio_onset_mkl; else if (strcmp(optarg,"kl") == 0) type_onset = aubio_onset_kl; + else if (strcmp(optarg,"specflux") == 0) + type_onset = aubio_onset_specflux; else { errmsg("unknown onset type.\n"); abort(); diff --git a/python/aubio/task/utils.py b/python/aubio/task/utils.py index ef497188..95491a60 100644 --- a/python/aubio/task/utils.py +++ b/python/aubio/task/utils.py @@ -16,11 +16,13 @@ def get_onset_mode(nvalue): return aubio_onset_kl elif nvalue == 'mkl' : return aubio_onset_mkl + elif nvalue == 'specflux' : + return aubio_onset_specflux elif nvalue == 'dual' : return 'dual' else: import sys - print "unknown onset detection function selected" + print "unknown onset detection function selected: %s" % nvalue sys.exit(1) def get_pitch_mode(nvalue): -- 2.26.2