}
/* curlevel is negatif or 1 if silence */
- curlevel = aubio_level_detection(ibuf, threshold2);
+ curlevel = aubio_level_detection(ibuf, silence);
if (isonset) {
/* test for silence */
if (curlevel == 1.) {
isonset = aubio_peakpick_pimrt(onset,parms);
if (isonset) {
/* test for silence */
- if (aubio_silence_detection(ibuf, threshold2)==1)
+ if (aubio_silence_detection(ibuf, silence)==1)
isonset=0;
else
for (pos = 0; pos < overlap_size; pos++){
/*time for fft*/
if (pos == overlap_size-1) {
/* test for silence */
- if (aubio_silence_detection(ibuf, threshold2)==1) {
+ if (aubio_silence_detection(ibuf, silence)==1) {
if (wassilence==1) issilence = 1;
else issilence = 2;
wassilence=1;
//printf("tempo:\t%3.5f bpm \n",
//60.*44100./overlap_size/abs(btoutput[2]-btoutput[1]));
/* test for silence */
- if (aubio_silence_detection(ibuf, threshold2)==1) {
+ if (aubio_silence_detection(ibuf, silence)==1) {
isonset = 0;
istactus = 0;
} else {
aubio_onsetdetection_type type_onset = aubio_onset_kl;
aubio_onsetdetection_type type_onset2 = aubio_onset_complex;
smpl_t threshold = 0.3;
-smpl_t threshold2 = -90.;
+smpl_t silence = -90.;
uint_t buffer_size = 512; //1024;
uint_t overlap_size = 256; //512;
uint_t channels = 1;
usedoubled = 0;
break;
case 's': /* threshold value for onset */
- threshold2 = (smpl_t)atof(optarg);
+ silence = (smpl_t)atof(optarg);
break;
case 't': /* threshold value for onset */
threshold = (smpl_t)atof(optarg);
extern aubio_onsetdetection_type type_onset;
extern aubio_onsetdetection_type type_onset2;
extern smpl_t threshold;
-extern smpl_t threshold2;
+extern smpl_t silence;
extern uint_t buffer_size;
extern uint_t overlap_size;
extern uint_t channels;