diff base/Window.h @ 113:534373d65f39

* Use fractional window overlaps in the spectrogram, instead of percentages (90% is kind of meaningless when none of your window sizes are divisible by 10!) * ResizeableBitmap -> ResizeableBitset and the odd other tidy up
author Chris Cannam
date Wed, 10 May 2006 11:43:52 +0000
parents d397ea0a79f5
children a35098a9c814
line wrap: on
line diff
--- a/base/Window.h	Tue May 09 16:18:59 2006 +0000
+++ b/base/Window.h	Wed May 10 11:43:52 2006 +0000
@@ -108,8 +108,8 @@
 	    
     case GaussianWindow:
 	for (i = 0; i < n; ++i) {
-	    mult[i] = mult[i] * exp((-1.0 / (n*n)) * ((T(2*i) - n) *
-						      (T(2*i) - n)));
+            mult[i] = mult[i] * exp(-(pow(i - (n-1)/2.0, 2) /
+                                      (2 * pow(0.25 * n, 2)))); // sd = 0.25
 	}
 	break;