diff options
Diffstat (limited to 'plugins/LV2/src/BussColors4/BussColors4.cpp')
-rw-r--r-- | plugins/LV2/src/BussColors4/BussColors4.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/plugins/LV2/src/BussColors4/BussColors4.cpp b/plugins/LV2/src/BussColors4/BussColors4.cpp new file mode 100644 index 0000000..1bcb13a --- /dev/null +++ b/plugins/LV2/src/BussColors4/BussColors4.cpp @@ -0,0 +1,68 @@ +#include "BussColors4.h" +#include <iostream> +#include <lv2wrapper.h> +#include <cmath> + +BussColors4::BussColors4(double rate) + : LV2Plugin(rate) +{ +} + +void BussColors4::activate() +{ + A = 0.0; + B = 0.5; + C = 0.5; + D = 1.0; + + for (int count = 0; count < 174; count++) {bL[count] = 0; bR[count] = 0;} + for (int count = 0; count < 99; count++) {dL[count] = 0; dR[count] = 0;} + for (int count = 0; count < 34; count++) c[count] = count; //initial setup for 44.1K + g[1] = pow(10.0, -5.2 / 14.0); //dark + g[2] = pow(10.0, -6.2 / 14.0); //rock + g[3] = pow(10.0, -2.9 / 14.0); //lush + g[4] = pow(10.0, -1.1 / 14.0); //vibe + g[5] = pow(10.0, -5.1 / 14.0); //holo + g[6] = pow(10.0, -3.6 / 14.0); //punch + g[7] = pow(10.0, -2.3 / 14.0); //steel + g[8] = pow(10.0, -2.9 / 14.0); //tube + //preset gains for models + outg[1] = pow(10.0, -0.3 / 14.0); //dark + outg[2] = pow(10.0, 0.5 / 14.0); //rock + outg[3] = pow(10.0, -0.7 / 14.0); //lush + outg[4] = pow(10.0, -0.6 / 14.0); //vibe + outg[5] = pow(10.0, -0.2 / 14.0); //holo + outg[6] = pow(10.0, 0.3 / 14.0); //punch + outg[7] = pow(10.0, 0.1 / 14.0); //steel + outg[8] = pow(10.0, 0.9 / 14.0); //tube + //preset gains for models + controlL = 0; + controlR = 0; + slowdynL = 0; + slowdynR = 0; + gcount = 0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void BussColors4::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + + processReplacing(const_cast<float **>(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include <cmath> +#include "../../../LinuxVST/src/BussColors4/BussColors4Proc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper<BussColors4> plugin; |