summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-01-03 05:56:59 +1100
committerDamien Zammit <damien@zamaudio.com>2019-01-03 07:03:03 +1100
commit2fe73f3d2a8d3c94c54c89030a8db5d8dfe757ca (patch)
treea8f61580fee10c022013e473f65163508493956f
parente66fd188c6c8da19a15ad33f99c56ac186eb6516 (diff)
Hmm not badwtftube
-rw-r--r--plugins/ZamTube/ZamTubePlugin.cpp4
-rw-r--r--plugins/ZamTube/wdfcircuits.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/ZamTube/ZamTubePlugin.cpp b/plugins/ZamTube/ZamTubePlugin.cpp
index ca7d47e..1186492 100644
--- a/plugins/ZamTube/ZamTubePlugin.cpp
+++ b/plugins/ZamTube/ZamTubePlugin.cpp
@@ -950,9 +950,9 @@ void ZamTubePlugin::run(const float** inputs, float** outputs, uint32_t frames)
// protect against overflowing circuit
in = fabs(in) < DANGER ? in : 0.f;
- double pregain = from_dB(tubedrive*3. -10.);
+ double pregain = (tubedrive+4.)*40.;
double ViE = in * pregain;
- tubeout = ckt.advanc(ViE) * from_dB(mastergain*3.);
+ tubeout = ckt.advanc(ViE) * pregain * from_dB(mastergain*2.);
if (!ckt.on) {
tubeout = 0.0;
} else {
diff --git a/plugins/ZamTube/wdfcircuits.h b/plugins/ZamTube/wdfcircuits.h
index 8410fcb..726c0a7 100644
--- a/plugins/ZamTube/wdfcircuits.h
+++ b/plugins/ZamTube/wdfcircuits.h
@@ -76,7 +76,7 @@ public:
//b = (v - R*i)/2.
//par -> v1=v2=v3 i1+i2+i3=0
//ser -> v1+v2+v3=0 i1=i2=i3
-
+
//Set Bs
ViE = VE;
Real Ckb = -Cka;
@@ -109,12 +109,12 @@ public:
Cia = S0_3a1;
Real P2_3a1 = 0.5*(b3 + P2_3Gamma1*(-b3));
- Real S2_3a2 = 0.5*(P2_3a1+P2_3b1 + S2_3Gamma1*(P2_3a1-P2_3b1)/P2_3Gamma1);
+ Real S2_3a2 = 0.5*(-P2_3a1+ S2_3Gamma1*(P2_3a1));
Coa = S2_3a2;
- Real S2_3a1 = 0.5*(-(Coa+Cob) - S2_3b3 + S2_3Gamma1*(Coa-Cob)/CoR);
+ Real S2_3a1 = 0.5*(-(Cob/CoR) - S2_3b3 + S2_3Gamma1*(-Cob)/CoR);
Real Roa = S2_3a1;
- printf("Ki=%f Ko=%f Gi=%f Go=%f Pi=%f Po=%f Ro=%f\n", I3_3b3, b1, -S1_3b3, b2, P2_3b3, b3, Roa);
+ //printf("Ki=%f Ko=%f Gi=%f Go=%f Pi=%f Po=%f Ro=%f\n", I3_3b3, b1, -S1_3b3, b2, P2_3b3, b3, Roa);
return -Roa;
}