summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-01-11 22:31:15 +1100
committerDamien Zammit <damien@zamaudio.com>2019-01-11 22:31:15 +1100
commitb8a1eae96acca9c25ee825019abc08cd76daa295 (patch)
tree951ec00f47eec87f921870a7e8cd2a06318811be
parent8605264f25a28825d27aa5213dc6b05ee8903fb9 (diff)
Add Matt's preamp as insane setting
-rw-r--r--plugins/ZamTube/ZamTubePlugin.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/ZamTube/ZamTubePlugin.cpp b/plugins/ZamTube/ZamTubePlugin.cpp
index d5ae24c..75d00cb 100644
--- a/plugins/ZamTube/ZamTubePlugin.cpp
+++ b/plugins/ZamTube/ZamTubePlugin.cpp
@@ -250,6 +250,16 @@ void ZamTubePlugin::activate()
co[0] = 10e-9;
ro[0] = 1e+6;
+ /* Matt's preamp */
+ ci[1] = 1.0e-7;
+ rg[1] = 1.;
+ rk[1] = 820.;
+ ck[1] = 50e-6;
+ e[1] = 300.0;
+ er[1] = 120e+3;
+ co[1] = 4.7e-9;
+ ro[1] = 470e+3;
+
/* CLA's preamp (not good with all tonestacks)
ci[1] = 1.0e-7;
rg[1] = 5.6e+3;
@@ -281,7 +291,7 @@ void ZamTubePlugin::activate()
v.cg2 = 11.99;
v.ig02 = 3.917e-8;
- int pre = 0;
+ int pre = insane < 0.5 ? 0 : 1;
ckt.updateRValues(ci[pre], ck[pre], co[pre], e[pre], er[pre], rg[pre], 0., rk[pre], 136e+3, ro[pre], Fs, v);
ckt.warmup_tubes();
@@ -346,7 +356,7 @@ void ZamTubePlugin::run(const float** inputs, float** outputs, uint32_t frames)
float fSlow46 = (fSlow44 - (fConst1 * (fSlow36 + fSlow38)));
float tubeout = 0.f;
- int pre = 0; //insane < 0.5 ? 0 : 1;
+ int pre = insane < 0.5 ? 0 : 1;
float volumepot = tubedrive / 11. * 1e+6;
ckt.updateRValues(ci[pre], ck[pre], co[pre], e[pre], er[pre], rg[pre], volumepot, rk[pre], 136e+3, ro[pre], getSampleRate(), v);