From: Paul Brossier Date: Wed, 21 Nov 2007 11:02:28 +0000 (+0100) Subject: utils.c, utils.py: add specflux onset function X-Git-Tag: bzr2git~451 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=862d78f7adbe1541ea6b183bd18995a70b347914;p=aubio.git utils.c, utils.py: add specflux onset function --- 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):