#include "utils.h"
#define PROG_HAS_PITCH 1
#define PROG_HAS_ONSET 1
+#define PROG_HAS_SILENCE 1
#define PROG_HAS_JACK 1
// TODO add PROG_HAS_OUTPUT
#include "parse_args.h"
}
int main(int argc, char **argv) {
+ int ret = 0;
+
examples_common_init(argc,argv);
verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
verbmsg ("tolerance: %f\n", pitch_tolerance);
notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate);
+ if (notes == NULL) { ret = 1; goto beach; }
examples_common_process((aubio_process_func_t)process_block, process_print);
// send a last note off
- send_noteon (lastmidi, 0);
+ if (usejack) {
+ send_noteon (lastmidi, 0);
+ }
del_aubio_notes (notes);
+beach:
examples_common_del();
- return 0;
+ return ret;
}
-