diff options
Diffstat (limited to 'plugins/LV2/src/Srsly')
-rw-r--r-- | plugins/LV2/src/Srsly/Srsly.cpp | 51 | ||||
-rw-r--r-- | plugins/LV2/src/Srsly/Srsly.h | 49 | ||||
-rw-r--r-- | plugins/LV2/src/Srsly/Srsly.ttl | 76 | ||||
-rw-r--r-- | plugins/LV2/src/Srsly/manifest.ttl.in | 6 |
4 files changed, 182 insertions, 0 deletions
diff --git a/plugins/LV2/src/Srsly/Srsly.cpp b/plugins/LV2/src/Srsly/Srsly.cpp new file mode 100644 index 0000000..ca20182 --- /dev/null +++ b/plugins/LV2/src/Srsly/Srsly.cpp @@ -0,0 +1,51 @@ +#include "Srsly.h" +#include <iostream> +#include <lv2wrapper.h> + +Srsly::Srsly(double rate) + : LV2Plugin(rate) +{ +} + +void Srsly::activate() +{ + for (int x = 0; x < 11; x++) { + biquadM2[x] = 0.0; + biquadM7[x] = 0.0; + biquadM10[x] = 0.0; + biquadL3[x] = 0.0; + biquadL7[x] = 0.0; + biquadR3[x] = 0.0; + biquadR7[x] = 0.0; + biquadS3[x] = 0.0; + biquadS5[x] = 0.0; + } + A = 0.0; + B = 0.0; + C = 1.0; + D = 0.5; + E = 1.0; + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Srsly::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + E = *params[4]; + + processReplacing(const_cast<float **>(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include <cmath> +#include "../../../LinuxVST/src/Srsly/SrslyProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper<Srsly> plugin; diff --git a/plugins/LV2/src/Srsly/Srsly.h b/plugins/LV2/src/Srsly/Srsly.h new file mode 100644 index 0000000..246f262 --- /dev/null +++ b/plugins/LV2/src/Srsly/Srsly.h @@ -0,0 +1,49 @@ +#ifndef __Srsly_H +#define __Srsly_H + +#include <lv2plugin.h> + +class Srsly : public LV2Plugin<5> { +public: + Srsly(double rate); + + void activate(); + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/srsly"; + +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 biquadM2[11]; + long double biquadM7[11]; + long double biquadM10[11]; + + long double biquadL3[11]; + long double biquadL7[11]; + long double biquadR3[11]; + long double biquadR7[11]; + + long double biquadS3[11]; + long double biquadS5[11]; + + uint32_t fpd; + //default stuff + + float A; + float B; + float C; + float D; + float E; +}; + +#endif diff --git a/plugins/LV2/src/Srsly/Srsly.ttl b/plugins/LV2/src/Srsly/Srsly.ttl new file mode 100644 index 0000000..02b7474 --- /dev/null +++ b/plugins/LV2/src/Srsly/Srsly.ttl @@ -0,0 +1,76 @@ +# Airwindows Srsly 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/srsly> + 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 "Center" ; + 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 "Space" ; + 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 "Level" ; + 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 "Q" ; + 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 "Dry/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/Srsly/manifest.ttl.in b/plugins/LV2/src/Srsly/manifest.ttl.in new file mode 100644 index 0000000..450a562 --- /dev/null +++ b/plugins/LV2/src/Srsly/manifest.ttl.in @@ -0,0 +1,6 @@ +airwindows:srsly + a lv2:Plugin ; + doap:name "Airwindows Srsly" ; + doap:license <http://opensource.org/licenses/mit> ; + lv2:binary <Srsly@CMAKE_SHARED_LIBRARY_SUFFIX@> ; + rdfs:seeAlso <Srsly.ttl> . |