From 77101140984ec2a9b2547987ceb01ba1f98bd544 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 21 Jul 2020 22:46:15 +0200 Subject: LV2: Add Atmosphere plugins (buss and channel.) --- .../LV2/src/AtmosphereChannel/AtmosphereChannel.h | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h (limited to 'plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h') 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 + +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 -- cgit v1.2.3