#include "utils.h"
#define PROG_HAS_PITCH 1
#define PROG_HAS_ONSET 1
#define PROG_HAS_NOTES 1
#define PROG_HAS_SILENCE 1
#define PROG_HAS_JACK 1
#include "parse_args.h"
{
if (obuf->
data[2] != 0) {
lastmidi = obuf->
data[2];
send_noteon(lastmidi, 0);
}
if (obuf->
data[0] != 0) {
lastmidi = obuf->
data[0];
send_noteon(lastmidi, obuf->
data[1]);
}
}
void process_print (void)
{
}
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 ("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);
if (notes == NULL) { ret = 1; goto beach; }
if (onset_minioi != 0.) {
}
if (onset_threshold != 0.) {
errmsg ("warning: onset threshold not supported yet\n");
}
if (silence_threshold != -90.) {
errmsg ("failed setting notes silence threshold to %.2f\n",
silence_threshold);
}
}
if (release_drop != 10.) {
errmsg ("failed setting notes release drop to %.2f\n",
release_drop);
}
}
examples_common_process(process_block, process_print);
if (lastmidi) {
send_noteon (lastmidi, 0);
}
beach:
examples_common_del();
return ret;
}