utils.c, utils.py: add specflux onset function
authorPaul Brossier <piem@piem.org>
Wed, 21 Nov 2007 11:02:28 +0000 (12:02 +0100)
committerPaul Brossier <piem@piem.org>
Wed, 21 Nov 2007 11:02:28 +0000 (12:02 +0100)
examples/utils.c
python/aubio/task/utils.py

index bcdf5c18fa1c491d0c7e19210d1363f8ca9ca214..484a02c29198ffbc1418c82e9f4c35bece9023e9 100644 (file)
@@ -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();
index ef497188b6d299b0ded98640fa6adc27b37227dc..95491a601d1d4d549044e215b96abdadf8d46a30 100644 (file)
@@ -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):