examples/aubioonset.c: use seconds for minioi
authorPaul Brossier <piem@piem.org>
Sun, 11 Dec 2016 22:21:55 +0000 (23:21 +0100)
committerPaul Brossier <piem@piem.org>
Sun, 11 Dec 2016 22:21:55 +0000 (23:21 +0100)
doc/aubioonset.txt
examples/aubioonset.c
examples/parse_args.h

index 6e4e0cc..8bda545 100644 (file)
@@ -52,8 +52,8 @@ OPTIONS
   values imply more onsets detected. Increasing this threshold should reduce
   the number of incorrect detections. Defaults to 0.3.
 
   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
 
   -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
index c24245d..032eb00 100644 (file)
@@ -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.)
   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);
 
 
   onset = new_fvec (1);
 
index fd8e338..7689a42 100644 (file)
@@ -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"
       "       -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"
 #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 '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':
         onset_minioi = (smpl_t) atof (optarg);
         break;
       case 'p':