summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-10-14 23:56:34 +1100
committerDamien Zammit <damien@zamaudio.com>2015-10-14 23:56:34 +1100
commit1c868c8740c499fd0e861d9aa5b5733b263be030 (patch)
treefdf2a71d9785137687cdfb18703baca49485a27b
parent471b598d51bc01d2ca83050fb6cedd7e3e9ab03d (diff)
More accurate 1/3rd octave band filters
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r--plugins/ZamGEQ31/ZamGEQ31Plugin.cpp14
-rw-r--r--plugins/ZamGEQ31/ZamGEQ31Plugin.hpp4
2 files changed, 12 insertions, 6 deletions
diff --git a/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp b/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp
index 06870a5..ce22f28 100644
--- a/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp
+++ b/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp
@@ -519,10 +519,16 @@ void ZamGEQ31Plugin::geq(int i, float srate, float g)
{
int mm;
float w, omegaB, omegaM, glinear, alpham;
- const int stack[29] = { 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 3 };
+ // 2dB tolerance
+ //const int stack[29] = { 2, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 1, 1, 1, 1, 1, 1, 1,
+ // 1, 1, 1, 2, 3 };
+
+ const int stack[29] = { 16, 14, 10, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 10, 14, 16 };
w = 2. * M_PI / srate;
omegaB = w * (omegaU[i] - omegaL[i]);
diff --git a/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp b/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp
index 1ad2735..239873d 100644
--- a/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp
+++ b/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp
@@ -138,9 +138,9 @@ protected:
void geq(int i, float srate, float g);
double run_filter(int i, double in);
- double omegaL[29], omegaU[29], k[29], v[29], a[29], cm[29][6], a0m[29][6];
+ double omegaL[29], omegaU[29], k[29], v[29], a[29], cm[29][17], a0m[29][17];
int m[29];
- double w11[29][6], w12[29][6], w21[29][6], w22[29][6];
+ double w11[29][17], w12[29][17], w21[29][17], w22[29][17];
// -------------------------------------------------------------------
private: