From 6fe716223f9026e11f9f1c047fdc9734fd0e3781 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 27 Mar 2021 18:23:02 +0100 Subject: LV2: Add more plugins This adds the following plugins: - Baxandall - Beam - Biquad - Biquad2 - BiquadOneHalf Had to manually fix the `Type` param in the Biquad* plugins, since the script isn't able to pick up enumeration values. Apart from that the script took care of everything. --- plugins/LV2/CMakeLists.txt | 10 +-- plugins/LV2/manifest.ttl.in | 35 +++++++++++ plugins/LV2/src/Baxandall/Baxandall.cpp | 47 ++++++++++++++ plugins/LV2/src/Baxandall/Baxandall.h | 45 ++++++++++++++ plugins/LV2/src/Baxandall/Baxandall.ttl | 60 ++++++++++++++++++ plugins/LV2/src/Baxandall/manifest.ttl.in | 6 ++ plugins/LV2/src/Beam/Beam.cpp | 40 ++++++++++++ plugins/LV2/src/Beam/Beam.h | 37 +++++++++++ plugins/LV2/src/Beam/Beam.ttl | 60 ++++++++++++++++++ plugins/LV2/src/Beam/manifest.ttl.in | 6 ++ plugins/LV2/src/Biquad/Biquad.cpp | 39 ++++++++++++ plugins/LV2/src/Biquad/Biquad.h | 40 ++++++++++++ plugins/LV2/src/Biquad/Biquad.ttl | 73 ++++++++++++++++++++++ plugins/LV2/src/Biquad/manifest.ttl.in | 6 ++ plugins/LV2/src/Biquad2/Biquad2.cpp | 53 ++++++++++++++++ plugins/LV2/src/Biquad2/Biquad2.h | 54 +++++++++++++++++ plugins/LV2/src/Biquad2/Biquad2.ttl | 81 +++++++++++++++++++++++++ plugins/LV2/src/Biquad2/manifest.ttl.in | 6 ++ plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.cpp | 40 ++++++++++++ plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.h | 41 +++++++++++++ plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.ttl | 73 ++++++++++++++++++++++ plugins/LV2/src/BiquadOneHalf/manifest.ttl.in | 6 ++ 22 files changed, 853 insertions(+), 5 deletions(-) create mode 100644 plugins/LV2/src/Baxandall/Baxandall.cpp create mode 100644 plugins/LV2/src/Baxandall/Baxandall.h create mode 100644 plugins/LV2/src/Baxandall/Baxandall.ttl create mode 100644 plugins/LV2/src/Baxandall/manifest.ttl.in create mode 100644 plugins/LV2/src/Beam/Beam.cpp create mode 100644 plugins/LV2/src/Beam/Beam.h create mode 100644 plugins/LV2/src/Beam/Beam.ttl create mode 100644 plugins/LV2/src/Beam/manifest.ttl.in create mode 100644 plugins/LV2/src/Biquad/Biquad.cpp create mode 100644 plugins/LV2/src/Biquad/Biquad.h create mode 100644 plugins/LV2/src/Biquad/Biquad.ttl create mode 100644 plugins/LV2/src/Biquad/manifest.ttl.in create mode 100644 plugins/LV2/src/Biquad2/Biquad2.cpp create mode 100644 plugins/LV2/src/Biquad2/Biquad2.h create mode 100644 plugins/LV2/src/Biquad2/Biquad2.ttl create mode 100644 plugins/LV2/src/Biquad2/manifest.ttl.in create mode 100644 plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.cpp create mode 100644 plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.h create mode 100644 plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.ttl create mode 100644 plugins/LV2/src/BiquadOneHalf/manifest.ttl.in diff --git a/plugins/LV2/CMakeLists.txt b/plugins/LV2/CMakeLists.txt index 577a974..753c27f 100755 --- a/plugins/LV2/CMakeLists.txt +++ b/plugins/LV2/CMakeLists.txt @@ -25,11 +25,11 @@ add_airwindows_plugin(Average) add_airwindows_plugin(AverMatrix) add_airwindows_plugin(BassDrive) add_airwindows_plugin(BassKit) -# add_airwindows_plugin(Baxandall) -# add_airwindows_plugin(Beam) -# add_airwindows_plugin(Biquad) -# add_airwindows_plugin(Biquad2) -# add_airwindows_plugin(BiquadOneHalf) +add_airwindows_plugin(Baxandall) +add_airwindows_plugin(Beam) +add_airwindows_plugin(Biquad) +add_airwindows_plugin(Biquad2) +add_airwindows_plugin(BiquadOneHalf) # add_airwindows_plugin(Bite) # add_airwindows_plugin(BitGlitter) # add_airwindows_plugin(BitShiftGain) diff --git a/plugins/LV2/manifest.ttl.in b/plugins/LV2/manifest.ttl.in index 49d7406..2a6a70c 100644 --- a/plugins/LV2/manifest.ttl.in +++ b/plugins/LV2/manifest.ttl.in @@ -115,3 +115,38 @@ airwindows:basskit doap:license ; lv2:binary ; rdfs:seeAlso . + +airwindows:baxandall + a lv2:Plugin ; + doap:name "Airwindows Baxandall" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . + +airwindows:beam + a lv2:Plugin ; + doap:name "Airwindows Beam" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . + +airwindows:biquad + a lv2:Plugin ; + doap:name "Airwindows Biquad" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . + +airwindows:biquad2 + a lv2:Plugin ; + doap:name "Airwindows Biquad2" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . + +airwindows:biquadonehalf + a lv2:Plugin ; + doap:name "Airwindows BiquadOneHalf" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/Baxandall/Baxandall.cpp b/plugins/LV2/src/Baxandall/Baxandall.cpp new file mode 100644 index 0000000..65bfac3 --- /dev/null +++ b/plugins/LV2/src/Baxandall/Baxandall.cpp @@ -0,0 +1,47 @@ +#include "Baxandall.h" +#include +#include + +Baxandall::Baxandall(double rate) + : LV2Plugin(rate) +{ +} + +void Baxandall::activate() +{ + A = 0.5; + B = 0.5; + C = 0.5; + for (int x = 0; x < 9; x++) { + trebleAL[x] = 0.0; + trebleBL[x] = 0.0; + bassAL[x] = 0.0; + bassBL[x] = 0.0; + trebleAR[x] = 0.0; + trebleBR[x] = 0.0; + bassAR[x] = 0.0; + bassBR[x] = 0.0; + } + flip = false; + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Baxandall::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/Baxandall/BaxandallProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/Baxandall/Baxandall.h b/plugins/LV2/src/Baxandall/Baxandall.h new file mode 100644 index 0000000..f8e244f --- /dev/null +++ b/plugins/LV2/src/Baxandall/Baxandall.h @@ -0,0 +1,45 @@ +#ifndef __Baxandall_H +#define __Baxandall_H + +#include + +class Baxandall : public LV2Plugin<3> { +public: + Baxandall(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/baxandall"; + +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. + */ + + uint32_t fpd; + //default stuff + long double trebleAL[9]; + long double trebleBL[9]; + long double bassAL[9]; + long double bassBL[9]; + + long double trebleAR[9]; + long double trebleBR[9]; + long double bassAR[9]; + long double bassBR[9]; + bool flip; + + float A; + float B; + float C; +}; + +#endif diff --git a/plugins/LV2/src/Baxandall/Baxandall.ttl b/plugins/LV2/src/Baxandall/Baxandall.ttl new file mode 100644 index 0000000..6b92261 --- /dev/null +++ b/plugins/LV2/src/Baxandall/Baxandall.ttl @@ -0,0 +1,60 @@ +# Airwindows Baxandall plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EQPlugin ; + 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 "Treble" ; + 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 "Bass" ; + 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 "Output" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 5 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 6 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/Baxandall/manifest.ttl.in b/plugins/LV2/src/Baxandall/manifest.ttl.in new file mode 100644 index 0000000..490cc2f --- /dev/null +++ b/plugins/LV2/src/Baxandall/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:baxandall + a lv2:Plugin ; + doap:name "Airwindows Baxandall" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/Beam/Beam.cpp b/plugins/LV2/src/Beam/Beam.cpp new file mode 100644 index 0000000..efc3c6f --- /dev/null +++ b/plugins/LV2/src/Beam/Beam.cpp @@ -0,0 +1,40 @@ +#include "Beam.h" +#include +#include + +Beam::Beam(double rate) + : LV2Plugin(rate) +{ +} + +void Beam::activate() +{ + A = 1.0; + B = 0.5; + C = 0.0; + for(int count = 0; count < 99; count++) { + lastSampleL[count] = 0; + lastSampleR[count] = 0; + } + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Beam::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/Beam/BeamProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/Beam/Beam.h b/plugins/LV2/src/Beam/Beam.h new file mode 100644 index 0000000..7424765 --- /dev/null +++ b/plugins/LV2/src/Beam/Beam.h @@ -0,0 +1,37 @@ +#ifndef __Beam_H +#define __Beam_H + +#include + +class Beam : public LV2Plugin<3> { +public: + Beam(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/beam"; + +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. + */ + + float lastSampleL[100]; + float lastSampleR[100]; + uint32_t fpd; + //default stuff + + float A; + float B; + float C; +}; + +#endif diff --git a/plugins/LV2/src/Beam/Beam.ttl b/plugins/LV2/src/Beam/Beam.ttl new file mode 100644 index 0000000..3c60f68 --- /dev/null +++ b/plugins/LV2/src/Beam/Beam.ttl @@ -0,0 +1,60 @@ +# Airwindows Beam plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EffectsPlugin ; + 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 "Quant" ; + 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 "Focus" ; + 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 "DeRez" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 3 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 5 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 6 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/Beam/manifest.ttl.in b/plugins/LV2/src/Beam/manifest.ttl.in new file mode 100644 index 0000000..d1df876 --- /dev/null +++ b/plugins/LV2/src/Beam/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:beam + a lv2:Plugin ; + doap:name "Airwindows Beam" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/Biquad/Biquad.cpp b/plugins/LV2/src/Biquad/Biquad.cpp new file mode 100644 index 0000000..fa7bed7 --- /dev/null +++ b/plugins/LV2/src/Biquad/Biquad.cpp @@ -0,0 +1,39 @@ +#include "Biquad.h" +#include +#include + +Biquad::Biquad(double rate) + : LV2Plugin(rate) +{ +} + +void Biquad::activate() +{ + for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} + A = 1.0; + B = 0.5; + C = 0.5; + D = 1.0; + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Biquad::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/Biquad/BiquadProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/Biquad/Biquad.h b/plugins/LV2/src/Biquad/Biquad.h new file mode 100644 index 0000000..adaa121 --- /dev/null +++ b/plugins/LV2/src/Biquad/Biquad.h @@ -0,0 +1,40 @@ +#ifndef __Biquad_H +#define __Biquad_H + +#include + +class Biquad : public LV2Plugin<4> { +public: + Biquad(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/biquad"; + +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. + */ + + long double biquad[11]; //note that this stereo form doesn't require L and R forms! + //This is because so much of it is coefficients etc. that are the same on both channels. + //So the stored samples are in 7-8 and 9-10, and freq/res/coefficients serve both. + + uint32_t fpd; + //default stuff + + float A; + float B; + float C; + float D; +}; + +#endif diff --git a/plugins/LV2/src/Biquad/Biquad.ttl b/plugins/LV2/src/Biquad/Biquad.ttl new file mode 100644 index 0000000..fa00df8 --- /dev/null +++ b/plugins/LV2/src/Biquad/Biquad.ttl @@ -0,0 +1,73 @@ +# Airwindows Biquad plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EQPlugin ; + 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 "Type" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + lv2:portProperty lv2:integer, lv2:enumeration ; + lv2:scalePoint [ rdfs:label "lowpass" ; rdf:value 0.0 ] ; + lv2:scalePoint [ rdfs:label "highpass" ; rdf:value 0.26 ] ; + lv2:scalePoint [ rdfs:label "bandpass" ; rdf:value 0.51 ] ; + lv2:scalePoint [ rdfs:label "notch" ; rdf:value 0.76 ] ; + ] , [ + a lv2:InputPort , lv2:ControlPort ; + lv2:index 1 ; + lv2:symbol "B" ; + lv2:name "Freq" ; + 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 "Q" ; + 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 "Inv/Wet" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 5 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 6 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 7 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/Biquad/manifest.ttl.in b/plugins/LV2/src/Biquad/manifest.ttl.in new file mode 100644 index 0000000..540b1d9 --- /dev/null +++ b/plugins/LV2/src/Biquad/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:biquad + a lv2:Plugin ; + doap:name "Airwindows Biquad" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/Biquad2/Biquad2.cpp b/plugins/LV2/src/Biquad2/Biquad2.cpp new file mode 100644 index 0000000..0b1d731 --- /dev/null +++ b/plugins/LV2/src/Biquad2/Biquad2.cpp @@ -0,0 +1,53 @@ +#include "Biquad2.h" +#include +#include + +Biquad2::Biquad2(double rate) + : LV2Plugin(rate) +{ +} + +void Biquad2::activate() +{ + for (int x = 0; x < 15; x++) {biquad[x] = 0.0;} + for (int x = 0; x < 11; x++) {bL[x] = 0.0; bR[x] = 0.0; f[x] = 0.0;} + frequencychase = 0.0015; + resonancechase = 0.001; + outputchase = 1.0; + wetchase = 1.0; + + frequencysetting = -1.0; + resonancesetting = -1.0; + outputsetting = -1.0; + wetsetting = -2.0; //-1.0 is a possible setting here and this forces an update on chasespeed + + chasespeed = 500.0; + A = 1.0; + B = 0.5; + C = 0.5; + D = 1.0; + E = 1.0; + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Biquad2::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + E = *params[4]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/Biquad2/Biquad2Proc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/Biquad2/Biquad2.h b/plugins/LV2/src/Biquad2/Biquad2.h new file mode 100644 index 0000000..e511e3b --- /dev/null +++ b/plugins/LV2/src/Biquad2/Biquad2.h @@ -0,0 +1,54 @@ +#ifndef __Biquad2_H +#define __Biquad2_H + +#include + +class Biquad2 : public LV2Plugin<5> { +public: + Biquad2(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/biquad2"; + +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. + */ + + long double biquad[15]; //note that this stereo form doesn't require L and R forms! + //This is because so much of it is coefficients etc. that are the same on both channels. + //So the stored samples are in 7-8-9-10 and 11-12-13-14, and freq/res/coefficients serve both. + + double bL[11]; + double bR[11]; + double f[11]; + double frequencychase; + double resonancechase; + double outputchase; + double wetchase; + double frequencysetting; + double resonancesetting; + double outputsetting; + double wetsetting; + double chasespeed; + + uint32_t fpd; + //default stuff + + float A; + float B; + float C; + float D; + float E; +}; + +#endif diff --git a/plugins/LV2/src/Biquad2/Biquad2.ttl b/plugins/LV2/src/Biquad2/Biquad2.ttl new file mode 100644 index 0000000..a1c02c4 --- /dev/null +++ b/plugins/LV2/src/Biquad2/Biquad2.ttl @@ -0,0 +1,81 @@ +# Airwindows Biquad2 plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EQPlugin ; + 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 "Type" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + lv2:portProperty lv2:integer, lv2:enumeration ; + lv2:scalePoint [ rdfs:label "lowpass" ; rdf:value 0.0 ] ; + lv2:scalePoint [ rdfs:label "highpass" ; rdf:value 0.26 ] ; + lv2:scalePoint [ rdfs:label "bandpass" ; rdf:value 0.51 ] ; + lv2:scalePoint [ rdfs:label "notch" ; rdf:value 0.76 ] ; + ] , [ + a lv2:InputPort , lv2:ControlPort ; + lv2:index 1 ; + lv2:symbol "B" ; + lv2:name "Freq" ; + 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 "Q" ; + 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 "Output" ; + 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 "Inv/Wet" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 5 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 6 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 7 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 8 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/Biquad2/manifest.ttl.in b/plugins/LV2/src/Biquad2/manifest.ttl.in new file mode 100644 index 0000000..1003f2b --- /dev/null +++ b/plugins/LV2/src/Biquad2/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:biquad2 + a lv2:Plugin ; + doap:name "Airwindows Biquad2" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . diff --git a/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.cpp b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.cpp new file mode 100644 index 0000000..ac87d53 --- /dev/null +++ b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.cpp @@ -0,0 +1,40 @@ +#include "BiquadOneHalf.h" +#include +#include + +BiquadOneHalf::BiquadOneHalf(double rate) + : LV2Plugin(rate) +{ +} + +void BiquadOneHalf::activate() +{ + for (int x = 0; x < 9; x++) {biquadAL[x] = 0.0; biquadAR[x] = 0.0; biquadBL[x] = 0.0; biquadBR[x] = 0.0;} + flip = false; + A = 0.0; + B = 0.0; + C = 0.0; + D = 0.0; + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void BiquadOneHalf::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + + processReplacing(const_cast(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include +#include "../../../LinuxVST/src/BiquadOneHalf/BiquadOneHalfProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.h b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.h new file mode 100644 index 0000000..e44dc81 --- /dev/null +++ b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.h @@ -0,0 +1,41 @@ +#ifndef __BiquadOneHalf_H +#define __BiquadOneHalf_H + +#include + +class BiquadOneHalf : public LV2Plugin<4> { +public: + BiquadOneHalf(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/biquadonehalf"; + +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. + */ + + long double biquadAL[9]; + long double biquadAR[9]; + long double biquadBL[9]; + long double biquadBR[9]; + bool flip; + uint32_t fpd; + //default stuff + + float A; + float B; + float C; + float D; +}; + +#endif diff --git a/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.ttl b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.ttl new file mode 100644 index 0000000..f4eaf50 --- /dev/null +++ b/plugins/LV2/src/BiquadOneHalf/BiquadOneHalf.ttl @@ -0,0 +1,73 @@ +# Airwindows BiquadOneHalf plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:EffectsPlugin ; + 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 "Type" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + lv2:portProperty lv2:integer, lv2:enumeration ; + lv2:scalePoint [ rdfs:label "lowpass" ; rdf:value 0.0 ] ; + lv2:scalePoint [ rdfs:label "highpass" ; rdf:value 0.26 ] ; + lv2:scalePoint [ rdfs:label "bandpass" ; rdf:value 0.51 ] ; + lv2:scalePoint [ rdfs:label "notch" ; rdf:value 0.76 ] ; + ] , [ + a lv2:InputPort , lv2:ControlPort ; + lv2:index 1 ; + lv2:symbol "B" ; + lv2:name "Freq" ; + 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 "Q" ; + 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 "Inv/Wet" ; + lv2:default 0.5 ; + lv2:minimum 0.0 ; + lv2:maximum 1.0 ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 4 ; + lv2:symbol "in_l" ; + lv2:name "In left" ; + ] , [ + a lv2:InputPort , lv2:AudioPort ; + lv2:index 5 ; + lv2:symbol "in_r" ; + lv2:name "In right" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 6 ; + lv2:symbol "out_l" ; + lv2:name "Out left" ; + ] , [ + a lv2:OutputPort , lv2:AudioPort ; + lv2:index 7 ; + lv2:symbol "out_r" ; + lv2:name "Out right" ; + ] . diff --git a/plugins/LV2/src/BiquadOneHalf/manifest.ttl.in b/plugins/LV2/src/BiquadOneHalf/manifest.ttl.in new file mode 100644 index 0000000..15311b4 --- /dev/null +++ b/plugins/LV2/src/BiquadOneHalf/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:biquadonehalf + a lv2:Plugin ; + doap:name "Airwindows BiquadOneHalf" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . -- cgit v1.2.3