#include "utils.h"
#define PROG_HAS_TEMPO 1
#define PROG_HAS_ONSET 1
#define PROG_HAS_SILENCE 1
#define PROG_HAS_OUTPUT 1
#define PROG_HAS_JACK 1
#include "parse_args.h"
  if (silence_threshold != -90.)
  if ( !usejack && ! sink_uri ) return;
  if ( is_beat && !is_silence ) {
    
    if (usejack) send_noteon(miditap_note, miditap_velo);
  } else {
  }
  if (mix_input) {
  } else {
  }
}
void process_print (void) {
  if ( is_beat && !is_silence ) {
    outmsg ("\n");
  }
}
int main(int argc, char **argv) {
  int ret = 0;
  
  buffer_size = 1024;
  hop_size = 512;
  examples_common_init(argc,argv);
  verbmsg ("using source: %s at %dHz\n", source_uri, samplerate);
  verbmsg ("tempo method: %s, ", tempo_method);
  verbmsg ("buffer_size: %d, ", buffer_size);
  verbmsg ("hop_size: %d, ", hop_size);
  verbmsg ("threshold: %f\n", onset_threshold);
  if (tempo == NULL) { ret = 1; goto beach; }
  
  
  if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
  
  examples_common_process(process_block, process_print);
  
  if (usejack) {
    send_noteon (miditap_note, 0);
  }
beach:
  examples_common_del();
  return ret;
}