From: Paul Brossier Date: Sun, 11 Dec 2016 22:21:55 +0000 (+0100) Subject: examples/aubioonset.c: use seconds for minioi X-Git-Tag: 0.4.4~60 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=e0a9fd203a9252d80d9cd5e09b5d921c6c677000 examples/aubioonset.c: use seconds for minioi --- diff --git a/doc/aubioonset.txt b/doc/aubioonset.txt index 6e4e0ccd..8bda545e 100644 --- a/doc/aubioonset.txt +++ b/doc/aubioonset.txt @@ -52,8 +52,8 @@ OPTIONS values imply more onsets detected. Increasing this threshold should reduce the number of incorrect detections. Defaults to 0.3. - -M, --minioi value Set the minimum inter-onset interval, in millisecond, - the shortest interval between two consecutive onsets. Defaults to 12. + -M, --minioi value Set the minimum inter-onset interval, in seconds, the + shortest interval between two consecutive onsets. Defaults to 0.020 -s, --silence sil Set the silence threshold, in dB, under which the onset will not be detected. A value of -20.0 would eliminate most onsets but the diff --git a/examples/aubioonset.c b/examples/aubioonset.c index c24245dd..032eb004 100644 --- a/examples/aubioonset.c +++ b/examples/aubioonset.c @@ -75,7 +75,7 @@ int main(int argc, char **argv) { if (silence_threshold != -90.) aubio_onset_set_silence (o, silence_threshold); if (onset_minioi != 0.) - aubio_onset_set_minioi_ms (o, onset_minioi); + aubio_onset_set_minioi_s (o, onset_minioi); onset = new_fvec (1); diff --git a/examples/parse_args.h b/examples/parse_args.h index fd8e3380..7689a42a 100644 --- a/examples/parse_args.h +++ b/examples/parse_args.h @@ -93,7 +93,7 @@ void usage (FILE * stream, int exit_code) " -t --onset-threshold set onset detection threshold\n" " a value between 0.1 (more detections) and 1 (less); default=0.3\n" " -M --minioi set minimum inter-onset interval\n" - " a value in millisecond; default=12.\n" + " a value in second; default=0.012\n" #endif /* PROG_HAS_ONSET */ #ifdef PROG_HAS_PITCH " -p --pitch select pitch detection algorithm\n" @@ -231,7 +231,7 @@ parse_args (int argc, char **argv) case 't': /* threshold value for onset */ onset_threshold = (smpl_t) atof (optarg); break; - case 'M': /* threshold value for onset */ + case 'M': /* minimum inter-onset-interval */ onset_minioi = (smpl_t) atof (optarg); break; case 'p':