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.) --- plugins/LV2/CMakeLists.txt | 4 +- plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp | 40 +++++++++++ plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h | 77 ++++++++++++++++++++++ plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.ttl | 44 +++++++++++++ plugins/LV2/src/AtmosphereBuss/manifest.ttl.in | 12 ++++ .../src/AtmosphereChannel/AtmosphereChannel.cpp | 40 +++++++++++ .../LV2/src/AtmosphereChannel/AtmosphereChannel.h | 76 +++++++++++++++++++++ .../src/AtmosphereChannel/AtmosphereChannel.ttl | 44 +++++++++++++ plugins/LV2/src/AtmosphereChannel/manifest.ttl.in | 12 ++++ 9 files changed, 347 insertions(+), 2 deletions(-) create mode 100644 plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp create mode 100644 plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h create mode 100644 plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.ttl create mode 100644 plugins/LV2/src/AtmosphereBuss/manifest.ttl.in create mode 100644 plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp create mode 100644 plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h create mode 100644 plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.ttl create mode 100644 plugins/LV2/src/AtmosphereChannel/manifest.ttl.in (limited to 'plugins') diff --git a/plugins/LV2/CMakeLists.txt b/plugins/LV2/CMakeLists.txt index f2c86e4..69b2091 100755 --- a/plugins/LV2/CMakeLists.txt +++ b/plugins/LV2/CMakeLists.txt @@ -16,8 +16,8 @@ add_airwindows_plugin(ADT) add_airwindows_plugin(Air) add_airwindows_plugin(Apicolypse) add_airwindows_plugin(AQuickVoiceClip) -# add_airwindows_plugin(AtmosphereBuss) -# add_airwindows_plugin(AtmosphereChannel) +add_airwindows_plugin(AtmosphereBuss) +add_airwindows_plugin(AtmosphereChannel) # add_airwindows_plugin(Aura) # add_airwindows_plugin(Average) # add_airwindows_plugin(AverMatrix) diff --git a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp new file mode 100644 index 0000000..c6465fe --- /dev/null +++ b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp @@ -0,0 +1,40 @@ +#include "AtmosphereBuss.h" +#include +#include + +AtmosphereBuss::AtmosphereBuss(double rate) + : LV2Plugin(rate) + , gainchase(-90.0) + , settingchase(-90.0) + , chasespeed(350.0) + , thresholdA(0.618033988749894) + , thresholdB(0.679837387624884) + , thresholdC(0.747821126387373) + , thresholdD(0.82260323902611) + , thresholdE(0.904863562928721) + , thresholdF(0.995349919221593) + , thresholdG(1.094884911143752) + , thresholdH(1.204373402258128) + , thresholdI(1.32481074248394) + , thresholdJ(1.457291816732335) + , thresholdK(1.603020998405568) + , thresholdL(1.763323098246125) + , thresholdM(1.939655408070737) +{ +} + +void AtmosphereBuss::run(uint32_t num_samples) +{ + A = *params[0]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/AtmosphereBuss/AtmosphereBussProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h new file mode 100644 index 0000000..52dd36e --- /dev/null +++ b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h @@ -0,0 +1,77 @@ +#ifndef __AtmosphereBuss_H +#define __AtmosphereBuss_H + +#include + +class AtmosphereBuss : public LV2Plugin<1> { +public: + AtmosphereBuss(double rate); + + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/atmospherebuss"; + +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 diff --git a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.ttl b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.ttl new file mode 100644 index 0000000..8660845 --- /dev/null +++ b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.ttl @@ -0,0 +1,44 @@ +# Airwindows AtmosphereBuss plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EffectPlugin ; + lv2:project ; + + 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" ; + lv2:default 1.0 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 1 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 2 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/AtmosphereBuss/manifest.ttl.in b/plugins/LV2/src/AtmosphereBuss/manifest.ttl.in new file mode 100644 index 0000000..f8b7755 --- /dev/null +++ b/plugins/LV2/src/AtmosphereBuss/manifest.ttl.in @@ -0,0 +1,12 @@ +# LV2 Plugin manifest for Airwindows AtmosphereBuss plugin + +@prefix doap: . +@prefix lv2: . +@prefix rdfs: . + + + a lv2:Plugin ; + doap:name "Airwindows AtmosphereBuss" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp new file mode 100644 index 0000000..81709e7 --- /dev/null +++ b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp @@ -0,0 +1,40 @@ +#include "AtmosphereChannel.h" +#include +#include + +AtmosphereChannel::AtmosphereChannel(double rate) + : LV2Plugin(rate) + , gainchase(-90.0) + , settingchase(-90.0) + , chasespeed(350.0) + , thresholdA(0.618033988749894) + , thresholdB(0.679837387624884) + , thresholdC(0.747821126387373) + , thresholdD(0.82260323902611) + , thresholdE(0.904863562928721) + , thresholdF(0.995349919221593) + , thresholdG(1.094884911143752) + , thresholdH(1.204373402258128) + , thresholdI(1.32481074248394) + , thresholdJ(1.457291816732335) + , thresholdK(1.603020998405568) + , thresholdL(1.763323098246125) + , thresholdM(1.939655408070737) +{ +} + +void AtmosphereChannel::run(uint32_t num_samples) +{ + A = *params[0]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/AtmosphereChannel/AtmosphereChannelProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; 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 diff --git a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.ttl b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.ttl new file mode 100644 index 0000000..415fba0 --- /dev/null +++ b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.ttl @@ -0,0 +1,44 @@ +# Airwindows AtmosphereChannel plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EffectPlugin ; + lv2:project ; + + 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" ; + lv2:default 1.0 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 1 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 2 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/AtmosphereChannel/manifest.ttl.in b/plugins/LV2/src/AtmosphereChannel/manifest.ttl.in new file mode 100644 index 0000000..7a617e9 --- /dev/null +++ b/plugins/LV2/src/AtmosphereChannel/manifest.ttl.in @@ -0,0 +1,12 @@ +# LV2 Plugin manifest for Airwindows AtmosphereChannel plugin + +@prefix doap: . +@prefix lv2: . +@prefix rdfs: . + + + a lv2:Plugin ; + doap:name "Airwindows AtmosphereChannel" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . -- cgit v1.2.3