#include "utils.h"
#define PROG_HAS_PITCH 1
#define PROG_HAS_ONSET 1
#define PROG_HAS_JACK 1
#include "parse_args.h"
aubio_notes_t *notes;
{
aubio_notes_do (notes, ibuf, obuf);
if (obuf->
data[2] != 0) {
send_noteon(lastmidi, 0);
}
if (obuf->
data[0] != 0) {
send_noteon(lastmidi, obuf->
data[1]);
}
}
void process_print (void)
{
}
int main(int argc, char **argv) {
examples_common_init(argc,argv);
verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
verbmsg ("onset method: %s, ", onset_method);
verbmsg ("buffer_size: %d, ", buffer_size);
verbmsg ("hop_size: %d, ", hop_size);
verbmsg ("threshold: %f\n", onset_threshold);
verbmsg ("pitch method: %s, ", pitch_method);
verbmsg ("buffer_size: %d, ", buffer_size * 4);
verbmsg ("hop_size: %d, ", hop_size);
verbmsg ("tolerance: %f\n", pitch_tolerance);
notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate);
examples_common_process((aubio_process_func_t)process_block, process_print);
send_noteon (lastmidi, 0);
del_aubio_notes (notes);
examples_common_del();
return 0;
}