Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
112:7648e8502822 | 113:534373d65f39 |
---|---|
106 } | 106 } |
107 break; | 107 break; |
108 | 108 |
109 case GaussianWindow: | 109 case GaussianWindow: |
110 for (i = 0; i < n; ++i) { | 110 for (i = 0; i < n; ++i) { |
111 mult[i] = mult[i] * exp((-1.0 / (n*n)) * ((T(2*i) - n) * | 111 mult[i] = mult[i] * exp(-(pow(i - (n-1)/2.0, 2) / |
112 (T(2*i) - n))); | 112 (2 * pow(0.25 * n, 2)))); // sd = 0.25 |
113 } | 113 } |
114 break; | 114 break; |
115 | 115 |
116 case ParzenWindow: | 116 case ParzenWindow: |
117 for (i = 0; i < n; ++i) { | 117 for (i = 0; i < n; ++i) { |