summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2020-11-25 11:50:56 +1100
committerDamien Zammit <damien@zamaudio.com>2020-12-01 14:16:17 +1100
commit6ea40259d8c8fd7951a6f9606f193ec0ee6a9203 (patch)
treec2e27e16125867c392a4f760deb48c1481d80c74
parent6661e42501e773ed43c7062b1c078f2e76d70174 (diff)
WIP: More bass, tone stacks respondzamtube-weirddiode
-rw-r--r--plugins/ZamTube/ZamTubePlugin.cpp20
-rw-r--r--plugins/ZamTube/wdfcircuits.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/ZamTube/ZamTubePlugin.cpp b/plugins/ZamTube/ZamTubePlugin.cpp
index 6c2217d..02a7e69 100644
--- a/plugins/ZamTube/ZamTubePlugin.cpp
+++ b/plugins/ZamTube/ZamTubePlugin.cpp
@@ -310,14 +310,14 @@ void ZamTubePlugin::activate()
*/
/* Matt's preamp */
- ci[0] = 100e-9;
- rg[0] = 100e+0;
- rk[0] = 1200.; // 820 originally
- ck[0] = 50e-6;
+ ci[0] = 0.5e-6;
+ rg[0] = 1.;
+ rk[0] = 900.; // 820 originally
+ ck[0] = 10e-6;
e[0] = 300.0;
- er[0] = 120e+3;
+ er[0] = 100e+3;
co[0] = 0.5e-6;
- ro[0] = 1000e+3;
+ ro[0] = 240e+3;
/* CLA's preamp
ci[0] = 1.0e-7;
@@ -331,9 +331,9 @@ void ZamTubePlugin::activate()
*/
int pre = 0;
- float volumepot = 900e+3; // 100 good at low gain, 1000 good at high gain
+ float volumepot = 100e+3; // 100 good at low gain, 1000 good at high gain
ckt.on = false;
- ckt.updateRValues(ci[pre], ck[pre], co[pre], e[pre], er[pre], rg[pre], volumepot, rk[pre], 1e+0, ro[pre], Fs);
+ ckt.updateRValues(ci[pre], ck[pre], co[pre], e[pre], er[pre], rg[pre], volumepot, rk[pre], 1., ro[pre], Fs);
ckt.warmup_tubes();
fSamplingFreq = Fs;
@@ -412,7 +412,7 @@ void ZamTubePlugin::run(const float** inputs, float** outputs, uint32_t frames)
float cut = insane ? 0. : 15.;
float pregain = from_dB(tubedrive*3.6364 - cut + mastergain);
- float postgain = from_dB(cut + 42. * (1. - log1p(tubedrive/11.)));
+ //float postgain = from_dB(cut + 42. * (1. - log1p(tubedrive/11.)));
for (uint32_t i = 0; i < frames; ++i) {
@@ -423,7 +423,7 @@ void ZamTubePlugin::run(const float** inputs, float** outputs, uint32_t frames)
fRec0[0] = (in - (fSlow31 * (((fSlow30 * fRec0[1]) + (fSlow29 * fRec0[2])) + (fSlow27 * fRec0[3])))) + 1e-20f;
toneout = sanitize_denormal((float)(fSlow31 * ((((fSlow46 * fRec0[0]) + (fSlow45 * fRec0[1])) + (fSlow43 * fRec0[2])) + (fSlow41 * fRec0[3]))));
- outputs[0][i] = ckt.advanc(toneout) * postgain / 10000.;
+ outputs[0][i] = ckt.advanc(toneout) / 500.;
// update filter states
fRec0[3] = fRec0[2];
diff --git a/plugins/ZamTube/wdfcircuits.h b/plugins/ZamTube/wdfcircuits.h
index de705ce..acc2b1e 100644
--- a/plugins/ZamTube/wdfcircuits.h
+++ b/plugins/ZamTube/wdfcircuits.h
@@ -125,7 +125,7 @@ public:
//Call tube model
Vg = -(S1_3b3);
Real Vd = Vk+Vg;
- Real Rd = (Vd < 0.) ? 2.7e+3 : 10e+6;
+ Real Rd = (Vd < 0.) ? 100e+3 : 100e+6;
Vk = -(P1_3b3 - Vg * S1_3Gamma1 / Rd);
Real b = t.compute(S2_3b3, S2_3Gamma1, Vg, Vk);
//Set As
@@ -153,7 +153,7 @@ public:
Real S0_3b1 = Cib - S0_3Gamma1*(Cib + ViE + P0_3b1);
Cia = S0_3b1;
//RiSetA
- printf("Vk=%f Vg=%f Vd=%f in=%f out=%f\n", Vk,Vg,Vd, ViE,Roa);
+ //printf("Vk=%f Vg=%f Vd=%f in=%f out=%f\n", Vk,Vg,Vd, ViE,Roa);
return Roa;
}