shithub: sox

Download patch

ref: d99a8f7962824c8efec61d380a996e2162a51e13
parent: f22c816ea8283257a2b83116c02f88e25f31c2dc
author: cbagwell <cbagwell>
date: Wed Dec 22 17:23:16 EST 1999

Updates to test programs.

--- a/test/README
+++ b/test/README
@@ -77,18 +77,18 @@
 
 step 1:  the entire sample file is read in, and the center-of-gravity of
          the squared samples is found.  This is the time offset which should
-	 correspond to the center of the filtered/resampled tone-pulse.
+         correspond to the center of the filtered/resampled tone-pulse.
 
 step 2:  let N = 16000*(rate1/rate0) be the number of samples at output rate
-	 which would correspond to the 16000 sample duration at max volume.
-	 We focus on the samples between
-         (center - 0.3*N)    and    (center + 0.9*N)
-	 where the transient effects of attack/release envelope should be
-	 small.
-	 We do a least-squares fit of a sinusoid at the adjusted frequency
-	 to this segment of 0.6*N samples, and print out the component
-	 s2max which can be explained, and also the rms level of the 'error'
-	 or unexplained part.
+         which would correspond to the 16000 sample duration at max volume.
+         We focus on the samples between
+             (center - 0.3*N)    and    (center + 0.9*N)
+         where the transient effects of attack/release envelope should be
+         small.
+         We do a least-squares fit of a sinusoid at the adjusted frequency
+         to this segment of 0.6*N samples, and print out the component
+         s2max which can be explained, and also the rms level of the 'error'
+         or unexplained part.
 
 That's pretty much it... the ltest perl-script glues it together and outputs
 adjusted data which the gnuplot will like.
--- a/test/ltest.pl
+++ b/test/ltest.pl
@@ -71,7 +71,7 @@
 	}
 }
 print("#   with tone pulses from 0.00 to 0.99 percent of Nyquist\n");
-print("#   produced by $ding -f0.xx -v0.5 -o$p -e$p:$env:$p d/i0.xx.$t\n");
+print("#   produced by $ding -f0.xx -v0.5 -e$p:$env:$p d/i0.xx.$t\n");
 
 # generate the test data
 mkdir("d",0775);
@@ -83,10 +83,10 @@
 
 	#if ($f>0.995) { $f=0.999; }
 	my $s=sprintf("%4.2f",$f);
-	#print "$ding -v0.5 -e$p:$env:$p -f$s -d1.0 d/i$s.$t\n";
-	qx{$ding -v0.5 -e$p:$env:$p -f$s -d1.0 d/i$s.$t &>/dev/null};
+	#print "$ding -f$s -v0.5 -d1.0 -e$p:$env:$p d/i$s.$t\n";
+	qx{$ding -f$s -v0.5 -d1.0 -e$p:$env:$p d/i$s.$t &>/dev/null};
 	if ($ratechange==0) {
-		qx{$sox -r$rate0 d/i$s.$t -r$rate0 d/j$s.$t $effect 2>/dev/null};
+		qx{$sox -r$rate0 d/i$s.$t -r$rate0 d/j$s.$t $effect} ;
 		@mod = grep {/v2max/} qx{$model -f$s -e$env $rate0 d/j$s.$t 2>&1};
 	} else {
 		qx{$sox -r$rate0 d/i$s.$t -r$rate1 d/u$s.$t $effect 2>/dev/null};