aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/Logical4/Logical4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LV2/src/Logical4/Logical4.cpp')
-rw-r--r--plugins/LV2/src/Logical4/Logical4.cpp102
1 files changed, 102 insertions, 0 deletions
diff --git a/plugins/LV2/src/Logical4/Logical4.cpp b/plugins/LV2/src/Logical4/Logical4.cpp
new file mode 100644
index 0000000..167e198
--- /dev/null
+++ b/plugins/LV2/src/Logical4/Logical4.cpp
@@ -0,0 +1,102 @@
+#include "Logical4.h"
+#include <iostream>
+#include <lv2wrapper.h>
+
+Logical4::Logical4(double rate)
+ : LV2Plugin(rate)
+{
+}
+
+void Logical4::activate()
+{
+ A = 0.5;
+ B = 0.2;
+ C = 0.19202020202020202;
+ D = 0.5;
+ E = 1.0;
+
+ //begin ButterComps
+ controlAposL = 1.0;
+ controlAnegL = 1.0;
+ controlBposL = 1.0;
+ controlBnegL = 1.0;
+ targetposL = 1.0;
+ targetnegL = 1.0;
+
+ controlAposBL = 1.0;
+ controlAnegBL = 1.0;
+ controlBposBL = 1.0;
+ controlBnegBL = 1.0;
+ targetposBL = 1.0;
+ targetnegBL = 1.0;
+
+ controlAposCL = 1.0;
+ controlAnegCL = 1.0;
+ controlBposCL = 1.0;
+ controlBnegCL = 1.0;
+ targetposCL = 1.0;
+ targetnegCL = 1.0;
+
+ avgAL = avgBL = avgCL = avgDL = avgEL = avgFL = 0.0;
+ nvgAL = nvgBL = nvgCL = nvgDL = nvgEL = nvgFL = 0.0;
+ //end ButterComps
+
+ //begin ButterComps
+ controlAposR = 1.0;
+ controlAnegR = 1.0;
+ controlBposR = 1.0;
+ controlBnegR = 1.0;
+ targetposR = 1.0;
+ targetnegR = 1.0;
+
+ controlAposBR = 1.0;
+ controlAnegBR = 1.0;
+ controlBposBR = 1.0;
+ controlBnegBR = 1.0;
+ targetposBR = 1.0;
+ targetnegBR = 1.0;
+
+ controlAposCR = 1.0;
+ controlAnegCR = 1.0;
+ controlBposCR = 1.0;
+ controlBnegCR = 1.0;
+ targetposCR = 1.0;
+ targetnegCR = 1.0;
+
+ avgAR = avgBR = avgCR = avgDR = avgER = avgFR = 0.0;
+ nvgAR = nvgBR = nvgCR = nvgDR = nvgER = nvgFR = 0.0;
+ //end ButterComps
+
+ //begin Power Sags
+ for(int count = 0; count < 999; count++) {dL[count] = 0; bL[count] = 0; cL[count] = 0; dR[count] = 0; bR[count] = 0; cR[count] = 0;}
+ controlL = 0; controlBL = 0; controlCL = 0;
+ controlR = 0; controlBR = 0; controlCR = 0;
+
+ gcount = 0;
+ //end Power Sags
+ fpFlip = true;
+ fpNShapeL = 0.0;
+ fpNShapeR = 0.0;
+ //this is reset: values being initialized only once. Startup values, whatever they are.
+
+}
+
+void Logical4::run(uint32_t num_samples)
+{
+ A = *params[0];
+ B = *params[1];
+ C = *params[2];
+ D = *params[3];
+ E = *params[4];
+
+ processReplacing(const_cast<float **>(in), out, num_samples);
+}
+
+//
+// Include the processing code from the VST version.
+//
+#include <cmath>
+#include "../../../LinuxVST/src/Logical4/Logical4Proc.cpp"
+
+// Create the LV2Wrapper and register the plugin
+LV2Wrapper<Logical4> plugin;