aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/IronOxide5
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LV2/src/IronOxide5')
-rw-r--r--plugins/LV2/src/IronOxide5/IronOxide5.cpp71
-rw-r--r--plugins/LV2/src/IronOxide5/IronOxide5.h83
-rw-r--r--plugins/LV2/src/IronOxide5/IronOxide5.ttl92
-rw-r--r--plugins/LV2/src/IronOxide5/manifest.ttl.in6
4 files changed, 252 insertions, 0 deletions
diff --git a/plugins/LV2/src/IronOxide5/IronOxide5.cpp b/plugins/LV2/src/IronOxide5/IronOxide5.cpp
new file mode 100644
index 0000000..77a9424
--- /dev/null
+++ b/plugins/LV2/src/IronOxide5/IronOxide5.cpp
@@ -0,0 +1,71 @@
+#include "IronOxide5.h"
+#include <iostream>
+#include <lv2wrapper.h>
+
+IronOxide5::IronOxide5(double rate)
+ : LV2Plugin(rate)
+{
+}
+
+void IronOxide5::activate()
+{
+ A = 0.5; //0.0 input trim in dB -18 to +18, default 0 ((A*36.0)-18.0)
+ B = 0.562341325190349; //15.0 ips 1.5 to 150.0 logarithmic. B*B
+ C = 0.562341325190349; // (C*C) * (C*C) * 150 gives 15 ips (clamp to 1.5 minimum)
+ //15.0 (0.316227766016838)squared * 150 gives 15 ips
+ D = 0.5; //0.5 flutter 0 to 1
+ E = 0.5; //0.5 noise 0 to 1
+ F = 0.5; //0.0 output trim in dB -18 to +18, default 0 ((E*36.0)-18.0)
+ G = 1.0; //1.0 inv/dry/wet -1 0 1 ((F*2.0)-1.0)
+ //needs very fussy defaults to comply with unusual defaults
+
+ for (int temp = 0; temp < 263; temp++) {dL[temp] = 0.0; dR[temp] = 0.0;}
+ gcount = 0;
+
+ fastIIRAL = fastIIRBL = slowIIRAL = slowIIRBL = 0.0;
+ fastIIHAL = fastIIHBL = slowIIHAL = slowIIHBL = 0.0;
+ iirSamplehAL = iirSamplehBL = 0.0;
+ iirSampleAL = iirSampleBL = 0.0;
+ prevInputSampleL = 0.0;
+
+ fastIIRAR = fastIIRBR = slowIIRAR = slowIIRBR = 0.0;
+ fastIIHAR = fastIIHBR = slowIIHAR = slowIIHBR = 0.0;
+ iirSamplehAR = iirSamplehBR = 0.0;
+ iirSampleAR = iirSampleBR = 0.0;
+ prevInputSampleR = 0.0;
+
+ flip = false;
+ for (int temp = 0; temp < 99; temp++) {flL[temp] = 0.0; flR[temp] = 0.0;}
+
+ fstoredcount = 0;
+ sweep = 0.0;
+ rateof = 0.5;
+ nextmax = 0.5;
+
+ fpNShapeL = 0.0;
+ fpNShapeR = 0.0;
+ //this is reset: values being initialized only once. Startup values, whatever they are.
+
+}
+
+void IronOxide5::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];
+
+ processReplacing(const_cast<float **>(in), out, num_samples);
+}
+
+//
+// Include the processing code from the VST version.
+//
+#include <cmath>
+#include "../../../LinuxVST/src/IronOxide5/IronOxide5Proc.cpp"
+
+// Create the LV2Wrapper and register the plugin
+LV2Wrapper<IronOxide5> plugin;
diff --git a/plugins/LV2/src/IronOxide5/IronOxide5.h b/plugins/LV2/src/IronOxide5/IronOxide5.h
new file mode 100644
index 0000000..9447326
--- /dev/null
+++ b/plugins/LV2/src/IronOxide5/IronOxide5.h
@@ -0,0 +1,83 @@
+#ifndef __IronOxide5_H
+#define __IronOxide5_H
+
+#include <lv2plugin.h>
+
+class IronOxide5 : public LV2Plugin<7> {
+public:
+ IronOxide5(double rate);
+
+ void activate();
+ void run(uint32_t num_samples);
+
+ static constexpr const char * URI = "https://www.airwindows.com/ironoxide5";
+
+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 iirSamplehAL;
+ double iirSamplehBL;
+ double iirSampleAL;
+ double iirSampleBL;
+ double dL[264];
+ double fastIIRAL;
+ double fastIIRBL;
+ double slowIIRAL;
+ double slowIIRBL;
+ double fastIIHAL;
+ double fastIIHBL;
+ double slowIIHAL;
+ double slowIIHBL;
+ double prevInputSampleL;
+
+ double iirSamplehAR;
+ double iirSamplehBR;
+ double iirSampleAR;
+ double iirSampleBR;
+ double dR[264];
+ double fastIIRAR;
+ double fastIIRBR;
+ double slowIIRAR;
+ double slowIIRBR;
+ double fastIIHAR;
+ double fastIIHBR;
+ double slowIIHAR;
+ double slowIIHBR;
+ double prevInputSampleR;
+
+ int gcount;
+ bool flip;
+
+ double flL[100];
+ double flR[100];
+
+ int fstoredcount;
+ double rateof;
+ double sweep;
+ double nextmax;
+
+
+ long double fpNShapeL;
+ long double fpNShapeR;
+ //default stuff
+
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ float G;
+
+};
+
+#endif
diff --git a/plugins/LV2/src/IronOxide5/IronOxide5.ttl b/plugins/LV2/src/IronOxide5/IronOxide5.ttl
new file mode 100644
index 0000000..65da368
--- /dev/null
+++ b/plugins/LV2/src/IronOxide5/IronOxide5.ttl
@@ -0,0 +1,92 @@
+# Airwindows IronOxide5 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/ironoxide5>
+ a lv2:Plugin ,
+ lv2:EffectsPlugin ;
+ 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 "Input Trim" ;
+ 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 "Tape High" ;
+ 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 "Tape Low" ;
+ 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 "Flutter" ;
+ 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 "Noise" ;
+ 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 "Output Trim" ;
+ 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 "Inv/Dry/Wet" ;
+ lv2:default 0.5 ;
+ lv2:minimum 0.0 ;
+ lv2:maximum 1.0 ;
+ ] , [
+ a lv2:InputPort , lv2:AudioPort ;
+ lv2:index 7 ;
+ lv2:symbol "in_l" ;
+ lv2:name "In left" ;
+ ] , [
+ a lv2:InputPort , lv2:AudioPort ;
+ lv2:index 8 ;
+ lv2:symbol "in_r" ;
+ lv2:name "In right" ;
+ ] , [
+ a lv2:OutputPort , lv2:AudioPort ;
+ lv2:index 9 ;
+ lv2:symbol "out_l" ;
+ lv2:name "Out left" ;
+ ] , [
+ a lv2:OutputPort , lv2:AudioPort ;
+ lv2:index 10 ;
+ lv2:symbol "out_r" ;
+ lv2:name "Out right" ;
+ ] .
diff --git a/plugins/LV2/src/IronOxide5/manifest.ttl.in b/plugins/LV2/src/IronOxide5/manifest.ttl.in
new file mode 100644
index 0000000..951e687
--- /dev/null
+++ b/plugins/LV2/src/IronOxide5/manifest.ttl.in
@@ -0,0 +1,6 @@
+airwindows:ironoxide5
+ a lv2:Plugin ;
+ doap:name "Airwindows IronOxide5" ;
+ doap:license <http://opensource.org/licenses/mit> ;
+ lv2:binary <IronOxide5@CMAKE_SHARED_LIBRARY_SUFFIX@> ;
+ rdfs:seeAlso <IronOxide5.ttl> .