o = new_aubio_onset (onset_mode, buffer_size, overlap_size, channels,
samplerate);
+ if (threshold != 0.) aubio_onset_set_threshold (o, threshold);
onset = new_fvec (1, channels);
pitchdet = new_aubio_pitch (pitch_mode, buffer_size * 4,
o = new_aubio_onset (onset_mode, buffer_size, overlap_size, channels,
samplerate);
+ if (threshold != 0.) aubio_onset_set_threshold (o, threshold);
onset = new_fvec (1, channels);
examples_common_process(aubio_process,process_print);
tempo_out = new_fvec(2,channels);
bt = new_aubio_tempo(onset_mode,buffer_size,overlap_size,channels, samplerate);
+ if (threshold != 0.) aubio_tempo_set_threshold (bt, threshold);
examples_common_process(aubio_process,process_print);
/* energy,specdiff,hfc,complexdomain,phase */
char_t * onset_mode = "default";
-smpl_t threshold = 0.3;
+smpl_t threshold = 0.0; // leave unset, only set as asked
smpl_t silence = -90.;
uint_t buffer_size = 512; //1024;
uint_t overlap_size = 256; //512;
case 'O': /*onset type */
onset_mode = optarg;
break;
- case 's': /* threshold value for onset */
+ case 's': /* silence value for onset */
silence = (smpl_t) atof (optarg);
break;
case 't': /* threshold value for onset */
threshold = (smpl_t) atof (optarg);
- /*
- if (!isfinite(threshold)) {
- debug("could not get threshold.\n");
- abort();
- }
- */
break;
case 'p':
pitch_mode = optarg;