shithub: aubio

Download patch

ref: 9da42028ec9aec5923c4e307b5d8422b9cb8bb45
parent: 4cb7a0ab8d9ff08153e4c8d392d6cbd69b29eed4
parent: 29a5e27a0bb29bc60af6f2c3dba95bb4ac149020
author: Paul Brossier <piem@piem.org>
date: Thu Jan 12 18:03:06 EST 2017

Merge branch 'miditap', thanks to Tres Seaver for his contributions

--- a/doc/aubioonset.txt
+++ b/doc/aubioonset.txt
@@ -9,7 +9,8 @@
              [-O method] [-t thres]
              [-T time-format]
              [-s sil] [-m] [-f]
-             [-j] [-v] [-h]
+             [-j] [-N miditap-note] [-V miditap-velo]
+             [-v] [-h]
 
 DESCRIPTION
 
@@ -69,6 +70,10 @@
 
   -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.
 
--- a/doc/aubiotrack.txt
+++ b/doc/aubiotrack.txt
@@ -8,7 +8,8 @@
              [-r rate] [-B win] [-H hop]
              [-T time-format]
              [-s sil] [-m]
-             [-j] [-v] [-h]
+             [-j] [-N miditap-note] [-V miditap-velo]
+             [-v] [-h]
 
 DESCRIPTION
 
@@ -53,6 +54,10 @@
 
   -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.
 
   -T, --timeformat format  Set time format (samples, ms, seconds). Defaults to
   seconds.
--- a/examples/parse_args.h
+++ b/examples/parse_args.h
@@ -117,6 +117,10 @@
 #endif /* PROG_HAS_OUTPUT */
 #ifdef PROG_HAS_JACK
       "       -j      --jack             use Jack\n"
+#if defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH)
+      "       -N      --miditap-note     MIDI note; default=69.\n"
+      "       -V      --miditap-velo     MIDI velocity; default=65.\n"
+#endif /* defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH) */
 #endif /* PROG_HAS_JACK */
       "       -v      --verbose          be verbose\n"
       "       -h      --help             display this message\n"
@@ -136,6 +140,9 @@
     "i:r:B:H:"
 #ifdef PROG_HAS_JACK
     "j"
+#if defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH)
+    "N:V:"
+#endif /* defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH) */
 #endif /* PROG_HAS_JACK */
 #ifdef PROG_HAS_OUTPUT
     "o:"
@@ -164,6 +171,10 @@
     {"hopsize",               1, NULL, 'H'},
 #ifdef PROG_HAS_JACK
     {"jack",                  0, NULL, 'j'},
+#if defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH)
+    {"miditap-note",          1, NULL, 'N'},
+    {"miditap-velo",          1, NULL, 'V'},
+#endif /* PROG_HAS_ONSET !PROG_HAS_PITCH */
 #endif /* PROG_HAS_JACK */
 #ifdef PROG_HAS_OUTPUT
     {"output",                1, NULL, 'o'},
@@ -206,6 +217,12 @@
         break;
       case 'j':
         usejack = 1;
+        break;
+      case 'N':
+        miditap_note = atof (optarg);
+        break;
+      case 'V':
+        miditap_velo = atof (optarg);
         break;
       case 'i':
         source_uri = optarg;