extern char_t * tempo_method;
// more general stuff
extern smpl_t silence_threshold;
+extern smpl_t release_drop;
extern uint_t mix_input;
// midi tap
extern smpl_t miditap_note;
// internal stuff
extern int blocks;
-extern fvec_t *ibuf;
-extern fvec_t *obuf;
+extern fvec_t *input_buffer;
+extern fvec_t *output_buffer;
const char *prog_name;
#endif /* PROG_HAS_ONSET */
#ifdef PROG_HAS_PITCH
" -p --pitch select pitch detection algorithm\n"
- " <default|yinfft|yin|mcomb|fcomb|schmitt>; default=yinfft\n"
+ " <default|yinfft|yinfast|yin|mcomb|fcomb|schmitt>; default=yinfft\n"
" -u --pitch-unit select pitch output unit\n"
" <default|freq|hertz|Hz|midi|cent|bin>; default=freq\n"
" -l --pitch-tolerance select pitch tolerance\n"
" -s --silence select silence threshold\n"
" a value in dB, for instance -70, or -100; default=-90\n"
#endif /* PROG_HAS_SILENCE */
+#ifdef PROG_HAS_NOTES
+ " -d --release-drop select release drop threshold\n"
+ " a positive value in dB; default=10\n"
+#endif
" -T --time-format select time values output format\n"
" (samples, ms, seconds) default=seconds\n"
#ifdef PROG_HAS_OUTPUT
#ifdef PROG_HAS_SILENCE
"s:"
#endif /* PROG_HAS_SILENCE */
+#ifdef PROG_HAS_NOTES
+ "d:"
+#endif /* PROG_HAS_SILENCE */
#ifdef PROG_HAS_OUTPUT
"mf"
#endif /* PROG_HAS_OUTPUT */
#ifdef PROG_HAS_SILENCE
{"silence", 1, NULL, 's'},
#endif /* PROG_HAS_SILENCE */
+#ifdef PROG_HAS_NOTES
+ {"release-drop", 1, NULL, 'd'},
+#endif /* PROG_HAS_NOTES */
{"time-format", 1, NULL, 'T'},
#ifdef PROG_HAS_OUTPUT
{"mix-input", 0, NULL, 'm'},
{NULL, 0, NULL, 0}
};
#endif /* HAVE_GETOPT_H */
- prog_name = argv[0];
+ // better safe than sorry
if (argc < 1) {
usage (stderr, 1);
- return -1;
}
+ prog_name = argv[0];
#ifdef HAVE_GETOPT_H
do {
next_option = getopt_long (argc, argv, options, long_options, NULL);
case 's': /* silence threshold */
silence_threshold = (smpl_t) atof (optarg);
break;
+ case 'd': /* release-drop threshold */
+ release_drop = (smpl_t) atof (optarg);
+ break;
case 'm': /* mix_input flag */
mix_input = 1;
break;