aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/DubCenter
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LV2/src/DubCenter')
-rw-r--r--plugins/LV2/src/DubCenter/DubCenter.cpp109
-rw-r--r--plugins/LV2/src/DubCenter/DubCenter.h100
-rw-r--r--plugins/LV2/src/DubCenter/DubCenter.ttl116
-rw-r--r--plugins/LV2/src/DubCenter/manifest.ttl.in6
4 files changed, 331 insertions, 0 deletions
diff --git a/plugins/LV2/src/DubCenter/DubCenter.cpp b/plugins/LV2/src/DubCenter/DubCenter.cpp
new file mode 100644
index 0000000..6104650
--- /dev/null
+++ b/plugins/LV2/src/DubCenter/DubCenter.cpp
@@ -0,0 +1,109 @@
+#include "DubCenter.h"
+#include <iostream>
+#include <lv2wrapper.h>
+
+DubCenter::DubCenter(double rate)
+ : LV2Plugin(rate)
+{
+}
+
+void DubCenter::activate()
+{
+ A = 0.9;
+ B = 0.5;
+ C = 0.74;
+ D = 1.0;
+ E = 0.95;
+ F = 0.5;
+ G = 0.2;
+ H = 0.2;
+ I = 0.5;
+ J = 1.0;
+
+ WasNegative = false;
+ SubOctave = false;
+ flip = false;
+ bflip = 0;
+ iirDriveSampleAL = 0.0;
+ iirDriveSampleBL = 0.0;
+ iirDriveSampleCL = 0.0;
+ iirDriveSampleDL = 0.0;
+ iirDriveSampleEL = 0.0;
+ iirDriveSampleFL = 0.0;
+ iirDriveSampleAR = 0.0;
+ iirDriveSampleBR = 0.0;
+ iirDriveSampleCR = 0.0;
+ iirDriveSampleDR = 0.0;
+ iirDriveSampleER = 0.0;
+ iirDriveSampleFR = 0.0;
+
+ iirHeadBumpA = 0.0;
+ iirHeadBumpB = 0.0;
+ iirHeadBumpC = 0.0;
+
+ iirSubBumpA = 0.0;
+ iirSubBumpB = 0.0;
+ iirSubBumpC = 0.0;
+
+ lastHeadBump = 0.0;
+ lastSubBump = 0.0;
+
+ iirSampleA = 0.0;
+ iirSampleB = 0.0;
+ iirSampleC = 0.0;
+ iirSampleD = 0.0;
+ iirSampleE = 0.0;
+ iirSampleF = 0.0;
+ iirSampleG = 0.0;
+ iirSampleH = 0.0;
+ iirSampleI = 0.0;
+ iirSampleJ = 0.0;
+ iirSampleK = 0.0;
+ iirSampleL = 0.0;
+ iirSampleM = 0.0;
+ iirSampleN = 0.0;
+ iirSampleO = 0.0;
+ iirSampleP = 0.0;
+ iirSampleQ = 0.0;
+ iirSampleR = 0.0;
+ iirSampleS = 0.0;
+ iirSampleT = 0.0;
+ iirSampleU = 0.0;
+ iirSampleV = 0.0;
+ iirSampleW = 0.0;
+ iirSampleX = 0.0;
+ iirSampleY = 0.0;
+ iirSampleZ = 0.0;
+
+ oscGate = 1.0;
+
+ fpNShapeL = 0.0;
+ fpNShapeR = 0.0;
+ //this is reset: values being initialized only once. Startup values, whatever they are.
+
+}
+
+void DubCenter::run(uint32_t num_samples)
+{
+ A = *params[0];
+ B = *params[1];
+ C = *params[2];
+ D = *params[3];
+ E = *params[4];
+ F = *params[5];
+ G = *params[6];
+ H = *params[7];
+ I = *params[8];
+ J = *params[9];
+
+ processReplacing(const_cast<float **>(in), out, num_samples);
+}
+
+//
+// Include the processing code from the VST version.
+//
+#include <cmath>
+#include "../../../LinuxVST/src/DubCenter/DubCenterProc.cpp"
+
+// Create the LV2Wrapper and register the plugin
+LV2Wrapper<DubCenter> plugin;
diff --git a/plugins/LV2/src/DubCenter/DubCenter.h b/plugins/LV2/src/DubCenter/DubCenter.h
new file mode 100644
index 0000000..f6c85e0
--- /dev/null
+++ b/plugins/LV2/src/DubCenter/DubCenter.h
@@ -0,0 +1,100 @@
+#ifndef __DubCenter_H
+#define __DubCenter_H
+
+#include <lv2plugin.h>
+
+class DubCenter : public LV2Plugin<10> {
+public:
+ DubCenter(double rate);
+
+ void activate();
+ void run(uint32_t num_samples);
+
+ static constexpr const char * URI = "https://www.airwindows.com/dubcenter";
+
+private:
+ /*
+ * These are the original DSP functions from the VST plugin.
+ * They need to be called from the LV2 plugins `run` function.
+ */
+ void processReplacing(float **in, float **out, VstInt32 samples);
+ void processDoubleReplacing(double **in, double **out, VstInt32 samples);
+
+ /*
+ * Members needed by the processing functions.
+ */
+
+ double iirDriveSampleAL;
+ double iirDriveSampleBL;
+ double iirDriveSampleCL;
+ double iirDriveSampleDL;
+ double iirDriveSampleEL;
+ double iirDriveSampleFL;
+ double iirDriveSampleAR;
+ double iirDriveSampleBR;
+ double iirDriveSampleCR;
+ double iirDriveSampleDR;
+ double iirDriveSampleER;
+ double iirDriveSampleFR;
+ bool flip; //drive things
+
+ int bflip;
+ bool WasNegative;
+ bool SubOctave;
+ double iirHeadBumpA;
+ double iirHeadBumpB;
+ double iirHeadBumpC;
+
+ double iirSubBumpA;
+ double iirSubBumpB;
+ double iirSubBumpC;
+
+ double lastHeadBump;
+ double lastSubBump;
+
+ double iirSampleA;
+ double iirSampleB;
+ double iirSampleC;
+ double iirSampleD;
+ double iirSampleE;
+ double iirSampleF;
+ double iirSampleG;
+ double iirSampleH;
+ double iirSampleI;
+ double iirSampleJ;
+ double iirSampleK;
+ double iirSampleL;
+ double iirSampleM;
+ double iirSampleN;
+ double iirSampleO;
+ double iirSampleP;
+ double iirSampleQ;
+ double iirSampleR;
+ double iirSampleS;
+ double iirSampleT;
+ double iirSampleU;
+ double iirSampleV;
+ double iirSampleW;
+ double iirSampleX;
+ double iirSampleY;
+ double iirSampleZ;
+ double oscGate;
+
+ long double fpNShapeL;
+ long double fpNShapeR;
+ //default stuff
+
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ float G;
+ float H;
+ float I;
+ float J;
+
+};
+
+#endif
diff --git a/plugins/LV2/src/DubCenter/DubCenter.ttl b/plugins/LV2/src/DubCenter/DubCenter.ttl
new file mode 100644
index 0000000..22f7b3d
--- /dev/null
+++ b/plugins/LV2/src/DubCenter/DubCenter.ttl
@@ -0,0 +1,116 @@
+# Airwindows DubCenter plugin description
+
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+<https://www.airwindows.com/dubcenter>
+ a lv2:Plugin ,
+ lv2:UtilityPlugin ;
+ lv2:project <https://www.airwindows.com> ;
+
+ lv2:optionalFeature lv2:hardRTCapable ;
+
+ # Define the ports for this plugin.
+ lv2:port [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 0 ;
+ lv2:symbol "A" ;
+ lv2:name "TGrind" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 1 ;
+ lv2:symbol "B" ;
+ lv2:name "Grd/Out" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 2 ;
+ lv2:symbol "C" ;
+ lv2:name "XOver" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 3 ;
+ lv2:symbol "D" ;
+ lv2:name "BsDrive" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 4 ;
+ lv2:symbol "E" ;
+ lv2:name "BsVoice" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 5 ;
+ lv2:symbol "F" ;
+ lv2:name "BassOut" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 6 ;
+ lv2:symbol "G" ;
+ lv2:name "SbDrive" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 7 ;
+ lv2:symbol "H" ;
+ lv2:name "SbVoice" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 8 ;
+ lv2:symbol "I" ;
+ lv2:name "SubOut" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:ControlPort ;
+ lv2:index 9 ;
+ lv2:symbol "J" ;
+ lv2:name "Dry/Wet" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:AudioPort ;
+ lv2:index 10 ;
+ lv2:symbol "in_l" ;
+ lv2:name "In left" ;
+ ] , [
+ a lv2:InputPort , lv2:AudioPort ;
+ lv2:index 11 ;
+ lv2:symbol "in_r" ;
+ lv2:name "In right" ;
+ ] , [
+ a lv2:OutputPort , lv2:AudioPort ;
+ lv2:index 12 ;
+ lv2:symbol "out_l" ;
+ lv2:name "Out left" ;
+ ] , [
+ a lv2:OutputPort , lv2:AudioPort ;
+ lv2:index 13 ;
+ lv2:symbol "out_r" ;
+ lv2:name "Out right" ;
+ ] .
diff --git a/plugins/LV2/src/DubCenter/manifest.ttl.in b/plugins/LV2/src/DubCenter/manifest.ttl.in
new file mode 100644
index 0000000..9db1328
--- /dev/null
+++ b/plugins/LV2/src/DubCenter/manifest.ttl.in
@@ -0,0 +1,6 @@
+airwindows:dubcenter
+ a lv2:Plugin ;
+ doap:name "Airwindows DubCenter" ;
+ doap:license <http://opensource.org/licenses/mit> ;
+ lv2:binary <DubCenter@CMAKE_SHARED_LIBRARY_SUFFIX@> ;
+ rdfs:seeAlso <DubCenter.ttl> .