From: Tres Seaver Date: Thu, 12 Jan 2017 16:38:35 +0000 (-0500) Subject: aubioonset: user-set MIDI tap note / velocity values. X-Git-Tag: 0.4.5~108^2~5 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=71bc8b0465419b6825921a2576ee6e31e7e15cb0;p=aubio.git aubioonset: user-set MIDI tap note / velocity values. --- diff --git a/doc/aubioonset.txt b/doc/aubioonset.txt index 8bda545e..f30cb329 100644 --- a/doc/aubioonset.txt +++ b/doc/aubioonset.txt @@ -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. diff --git a/examples/parse_args.h b/examples/parse_args.h index 7689a42a..8b246f99 100644 --- a/examples/parse_args.h +++ b/examples/parse_args.h @@ -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;