notes = new_aubio_notes ("default", buffer_size, hop_size, samplerate);
if (notes == NULL) { ret = 1; goto beach; }
+ if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
+
examples_common_process((aubio_process_func_t)process_block, process_print);
// send a last note off
aubio_onset_set_threshold (o, onset_threshold);
if (silence_threshold != -90.)
aubio_onset_set_silence (o, silence_threshold);
+ if (onset_minioi != 0.)
+ aubio_onset_set_minioi_ms (o, onset_minioi);
onset = new_fvec (1);
// set silence threshold very low to output beats even during silence
// aubio_tempo_set_silence(tempo, -1000.);
if (onset_threshold != 0.) aubio_tempo_set_threshold (tempo, onset_threshold);
+ if (onset_minioi != 0.) errmsg ("warning: minioio not supported yet\n");
wavetable = new_aubio_wavetable (samplerate, hop_size);
aubio_wavetable_set_freq ( wavetable, 2450.);
// onset stuff
extern char_t * onset_method;
extern smpl_t onset_threshold;
+extern smpl_t onset_minioi;
// pitch stuff
extern char_t * pitch_method;
extern char_t * pitch_unit;
" default=hfc\n"
" -t --onset-threshold set onset detection threshold\n"
" a value between 0.1 (more detections) and 1 (less); default=0.3\n"
+ " -M --minioi set minimum inter-onset interval\n"
+ " a value in millisecond; default=12.\n"
#endif /* PROG_HAS_ONSET */
#ifdef PROG_HAS_PITCH
" -p --pitch select pitch detection algorithm\n"
"o:"
#endif /* PROG_HAS_OUTPUT */
#ifdef PROG_HAS_ONSET
- "O:t:"
+ "O:t:M:"
#endif /* PROG_HAS_ONSET */
#ifdef PROG_HAS_PITCH
"p:u:l:"
#ifdef PROG_HAS_ONSET
{"onset", 1, NULL, 'O'},
{"onset-threshold", 1, NULL, 't'},
+ {"onset-minioi", 1, NULL, 'M'},
#endif /* PROG_HAS_ONSET */
#ifdef PROG_HAS_PITCH
{"pitch", 1, NULL, 'p'},
case 't': /* threshold value for onset */
onset_threshold = (smpl_t) atof (optarg);
break;
+ case 'M': /* threshold value for onset */
+ onset_minioi = (smpl_t) atof (optarg);
+ break;
case 'p':
pitch_method = optarg;
break;
// onset stuff
char_t * onset_method = "default";
smpl_t onset_threshold = 0.0; // will be set if != 0.
+smpl_t onset_minioi = 0.0; // will be set if != 0.
// pitch stuff
char_t * pitch_unit = "default";
char_t * pitch_method = "default";