aubioonset: user-set MIDI tap note / velocity values.
authorTres Seaver <tseaver@palladion.com>
Thu, 12 Jan 2017 16:38:35 +0000 (11:38 -0500)
committerTres Seaver <tseaver@palladion.com>
Thu, 12 Jan 2017 16:38:35 +0000 (11:38 -0500)
doc/aubioonset.txt
examples/parse_args.h

index 8bda545..f30cb32 100644 (file)
@@ -9,7 +9,8 @@ SYNOPSIS
              [-O method] [-t thres]
              [-T time-format]
              [-s sil] [-m] [-f]
-             [-j] [-v] [-h]
+             [-j] [-n miditap-note] [-V miditap-velo]
+             [-v] [-h]
 
 DESCRIPTION
 
@@ -70,6 +71,10 @@ OPTIONS
   -j, --jack  Use Jack input/output. You will need a Jack connection
   controller to feed aubio some signal and listen to its output.
 
+  -n, --miditap-note  Override note value for MIDI tap. Defaults to 69.
+
+  -V, --miditap-velop  Override velocity value for MIDI tap. Defaults to 65.
+
   -h, --help  Print a short help message and exit.
 
   -v, --verbose  Be verbose.
index 7689a42..8b246f9 100644 (file)
@@ -117,6 +117,8 @@ void usage (FILE * stream, int exit_code)
 #endif /* PROG_HAS_OUTPUT */
 #ifdef PROG_HAS_JACK
       "       -j      --jack             use Jack\n"
+      "       -n      --miditap-note     MIDI note\n"
+      "       -V      --miditap-velo     MIDI velocity\n"
 #endif /* PROG_HAS_JACK */
       "       -v      --verbose          be verbose\n"
       "       -h      --help             display this message\n"
@@ -135,7 +137,7 @@ parse_args (int argc, char **argv)
   const char *options = "hv"
     "i:r:B:H:"
 #ifdef PROG_HAS_JACK
-    "j"
+    "jn:V:"
 #endif /* PROG_HAS_JACK */
 #ifdef PROG_HAS_OUTPUT
     "o:"
@@ -164,6 +166,8 @@ parse_args (int argc, char **argv)
     {"hopsize",               1, NULL, 'H'},
 #ifdef PROG_HAS_JACK
     {"jack",                  0, NULL, 'j'},
+    {"miditap-note",          1, NULL, 'n'},
+    {"miditap-velo",          1, NULL, 'V'},
 #endif /* PROG_HAS_JACK */
 #ifdef PROG_HAS_OUTPUT
     {"output",                1, NULL, 'o'},
@@ -207,6 +211,12 @@ parse_args (int argc, char **argv)
       case 'j':
         usejack = 1;
         break;
+      case 'n':
+        miditap_note = atoi (optarg);
+        break;
+      case 'V':
+        miditap_velo = atoi (optarg);
+        break;
       case 'i':
         source_uri = optarg;
         break;