rename threshold2 to silence
authorPaul Brossier <piem@altern.org>
Thu, 6 Jul 2006 16:38:00 +0000 (16:38 +0000)
committerPaul Brossier <piem@altern.org>
Thu, 6 Jul 2006 16:38:00 +0000 (16:38 +0000)
rename threshold2 to silence

examples/aubionotes.c
examples/aubioonset.c
examples/aubioquiet.c
examples/aubiotrack.c
examples/utils.c
examples/utils.h

index 11abb43..c4e113e 100644 (file)
@@ -51,7 +51,7 @@ int aubio_process(float **input, float **output, int nframes) {
       }
 
       /* 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.) {
index 67c0395..880526f 100644 (file)
@@ -46,7 +46,7 @@ int aubio_process(float **input, float **output, int nframes) {
       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++){
index a9c3f46..4daa173 100644 (file)
@@ -38,7 +38,7 @@ int aubio_process(float **input, float **output, int nframes) {
     /*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;
index 6da2514..3eda8f3 100644 (file)
@@ -84,7 +84,7 @@ int aubio_process(float **input, float **output, int nframes) {
                       //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 {
index 43f67f7..0de946e 100644 (file)
@@ -38,7 +38,7 @@ int usedoubled = 1;
 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;
@@ -177,7 +177,7 @@ int parse_args (int argc, char **argv) {
                                 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);
index 3c48b65..d4d0223 100644 (file)
@@ -75,7 +75,7 @@ extern int usedoubled;
 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;