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 11abb43e90482b39624c20ab2c34ce565472a7e5..c4e113efc6f5beb4c2d9d5eae46e6f595bc42a4a 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 67c0395e7beec6671fbaf867d22fa5cdfa9af32a..880526f3a1970ef39d594559752ad396442d83d2 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 a9c3f461ecb79f64988e048088e27430bcdfb42d..4daa173c47d419810b4ef80933d6e8741731e01e 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 6da2514ec304d7e131f7663a9eb99d4f3e7a62e4..3eda8f3dbd848f8f22510b94d97f731655e7dba6 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 43f67f760c346e1fc44d14781383c51b8fc1e763..0de946ead911e01aebb27cb6a1f3707930a5dbdc 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 3c48b652b34b45b8b4776b96f64e5cc13ba86668..d4d02235eeed5bc85c03e701fba31ffa45af15e5 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;