summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2020-12-20 14:29:27 +1100
committerDamien Zammit <damien@zamaudio.com>2020-12-20 14:30:03 +1100
commitd9ad7afbbd74f68e3c1a90dec21ef1ac593e7399 (patch)
tree14a609339aa82b68b2c62d7e4596f7650577c57a
parent8e6e013ce9f569d68ab509139e210aaaf231c125 (diff)
ZamTube: Fix tonestack controls not updating
-rw-r--r--plugins/ZamTube/ZamTubePlugin.cpp9
-rw-r--r--plugins/ZamTube/ZamTubePlugin.hpp1
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/ZamTube/ZamTubePlugin.cpp b/plugins/ZamTube/ZamTubePlugin.cpp
index 7c39886..4587b03 100644
--- a/plugins/ZamTube/ZamTubePlugin.cpp
+++ b/plugins/ZamTube/ZamTubePlugin.cpp
@@ -284,6 +284,9 @@ void ZamTubePlugin::loadProgram(uint32_t index)
insane = 0.0f;
insaneold = 0.0f;
tonestackold = 0.0f;
+ bassold = 5.f;
+ middleold = 5.f;
+ trebleold = 5.f;
/* Default variable values */
@@ -411,8 +414,12 @@ void ZamTubePlugin::run(const float** inputs, float** outputs, uint32_t frames)
float pregain = from_dB(tubedrive*3.6364 - cut + mastergain);
float postgain = from_dB(cut + 42. * (1. - log1p(tubedrive/11.)));
- if (tonestackold != stack) {
+ if ((tonestackold != stack) || (bassold != bass) ||
+ (middleold != middle) || (trebleold != treble)) {
tonestackold = stack;
+ bassold = bass;
+ middleold = middle;
+ trebleold = treble;
ZamTubePlugin::TonestackRecompute(stack);
}
diff --git a/plugins/ZamTube/ZamTubePlugin.hpp b/plugins/ZamTube/ZamTubePlugin.hpp
index 6b2c9dc..617fc11 100644
--- a/plugins/ZamTube/ZamTubePlugin.hpp
+++ b/plugins/ZamTube/ZamTubePlugin.hpp
@@ -160,6 +160,7 @@ Wave digital filter physical model of a triode tube amplifier stage, with modell
private:
float tubedrive,bass,middle,treble,tonestack,mastergain,insane; //parameters
int insaneold, tonestackold;
+ float bassold, middleold, trebleold;
float ts[25][7];
float fSlow27, fSlow29, fSlow30, fSlow31, fSlow41, fSlow43, fSlow45, fSlow46;