aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h')
-rw-r--r--plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h
new file mode 100644
index 0000000..2d24a6e
--- /dev/null
+++ b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h
@@ -0,0 +1,76 @@
+#ifndef __AtmosphereChannel_H
+#define __AtmosphereChannel_H
+
+#include <lv2plugin.h>
+
+class AtmosphereChannel : public LV2Plugin<1> {
+public:
+ AtmosphereChannel(double rate);
+
+ void run(uint32_t num_samples);
+
+ static constexpr const char * URI = "https://www.airwindows.com/atmospherechannel";
+
+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 gainchase;
+ double settingchase;
+ double chasespeed;
+
+ long double fpNShapeL;
+ long double lastSampleAL;
+ long double lastSampleBL;
+ long double lastSampleCL;
+ long double lastSampleDL;
+ long double lastSampleEL;
+ long double lastSampleFL;
+ long double lastSampleGL;
+ long double lastSampleHL;
+ long double lastSampleIL;
+ long double lastSampleJL;
+ long double lastSampleKL;
+ long double lastSampleLL;
+ long double lastSampleML;
+
+ long double fpNShapeR;
+ long double lastSampleAR;
+ long double lastSampleBR;
+ long double lastSampleCR;
+ long double lastSampleDR;
+ long double lastSampleER;
+ long double lastSampleFR;
+ long double lastSampleGR;
+ long double lastSampleHR;
+ long double lastSampleIR;
+ long double lastSampleJR;
+ long double lastSampleKR;
+ long double lastSampleLR;
+ long double lastSampleMR;
+
+ long double thresholdA;
+ long double thresholdB;
+ long double thresholdC;
+ long double thresholdD;
+ long double thresholdE;
+ long double thresholdF;
+ long double thresholdG;
+ long double thresholdH;
+ long double thresholdI;
+ long double thresholdJ;
+ long double thresholdK;
+ long double thresholdL;
+ long double thresholdM;
+
+ float A;
+};
+
+#endif