diff options
author | Damien Zammit <damien@zamaudio.com> | 2020-11-25 10:02:07 +1100 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2020-12-01 14:13:28 +1100 |
commit | 6661e42501e773ed43c7062b1c078f2e76d70174 (patch) | |
tree | 006e8050374cf37d8371415327a72ede211e3e7a | |
parent | 00abe1f1a59e0e849bf4d7da436ed2f887c3ab42 (diff) |
WIP fixed
-rw-r--r-- | plugins/ZamTube/ZamTubePlugin.cpp | 8 | ||||
-rw-r--r-- | plugins/ZamTube/wdfcircuits.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/ZamTube/ZamTubePlugin.cpp b/plugins/ZamTube/ZamTubePlugin.cpp index b13fb4d..6c2217d 100644 --- a/plugins/ZamTube/ZamTubePlugin.cpp +++ b/plugins/ZamTube/ZamTubePlugin.cpp @@ -311,13 +311,13 @@ void ZamTubePlugin::activate() /* Matt's preamp */ ci[0] = 100e-9; - rg[0] = 1e-3; + rg[0] = 100e+0; rk[0] = 1200.; // 820 originally ck[0] = 50e-6; e[0] = 300.0; er[0] = 120e+3; co[0] = 0.5e-6; - ro[0] = 470e+3; + ro[0] = 1000e+3; /* CLA's preamp ci[0] = 1.0e-7; @@ -331,9 +331,9 @@ void ZamTubePlugin::activate() */ int pre = 0; - float volumepot = 800e+3; // 100 good at low gain, 1000 good at high gain + float volumepot = 900e+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+3, ro[pre], Fs); + ckt.updateRValues(ci[pre], ck[pre], co[pre], e[pre], er[pre], rg[pre], volumepot, rk[pre], 1e+0, ro[pre], Fs); ckt.warmup_tubes(); fSamplingFreq = Fs; diff --git a/plugins/ZamTube/wdfcircuits.h b/plugins/ZamTube/wdfcircuits.h index 59f7fd5..de705ce 100644 --- a/plugins/ZamTube/wdfcircuits.h +++ b/plugins/ZamTube/wdfcircuits.h @@ -123,11 +123,11 @@ public: //RkGetB //P1_2SetA //Call tube model - Vg = (S1_3b3); + Vg = -(S1_3b3); Real Vd = Vk+Vg; - Real Rd = (Vd > 0.) ? 2.7e+3 : 100e+9; + Real Rd = (Vd < 0.) ? 2.7e+3 : 10e+6; + Vk = -(P1_3b3 - Vg * S1_3Gamma1 / Rd); Real b = t.compute(S2_3b3, S2_3Gamma1, Vg, Vk); - Vk = -(P1_3b3 + Vd * S1_3Gamma1 / Rd); //Set As //S2_3SetA Real S2_3b1 = P2_3b3 - S2_3Gamma1*(P2_3b3 - (Vk+Vg) + b); @@ -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; } |