From 74b313b3d08e4cf88e55d246fbea4fe39ab49709 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 20 Jul 2020 23:49:56 +0200 Subject: LV2: Add plugin AQuickVoiceClip --- plugins/LV2/CMakeLists.txt | 3 +- .../LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp | 24 ++++++ plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h | 94 ++++++++++++++++++++++ .../LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl | 44 ++++++++++ plugins/LV2/src/AQuickVoiceClip/manifest.ttl.in | 12 +++ 5 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp create mode 100644 plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h create mode 100644 plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl create mode 100644 plugins/LV2/src/AQuickVoiceClip/manifest.ttl.in diff --git a/plugins/LV2/CMakeLists.txt b/plugins/LV2/CMakeLists.txt index baff4b1..f2c86e4 100755 --- a/plugins/LV2/CMakeLists.txt +++ b/plugins/LV2/CMakeLists.txt @@ -3,6 +3,7 @@ project(airwindows_ports) set(CMAKE_CXX_STANDARD 14) add_compile_options(-Wall -Werror -Wno-unused-value) +add_compile_options(-Wno-unused-but-set-variable) # AQuickVoiceClip include(Helpers.cmake) @@ -14,7 +15,7 @@ add_airwindows_plugin(ADClip7) add_airwindows_plugin(ADT) add_airwindows_plugin(Air) add_airwindows_plugin(Apicolypse) -# add_airwindows_plugin(AQuickVoiceClip) +add_airwindows_plugin(AQuickVoiceClip) # add_airwindows_plugin(AtmosphereBuss) # add_airwindows_plugin(AtmosphereChannel) # add_airwindows_plugin(Aura) diff --git a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp new file mode 100644 index 0000000..ac30296 --- /dev/null +++ b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp @@ -0,0 +1,24 @@ +#include "AQuickVoiceClip.h" +#include +#include + +AQuickVoiceClip::AQuickVoiceClip(double rate) + : LV2Plugin(rate) +{ +} + +void AQuickVoiceClip::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/AQuickVoiceClip/AQuickVoiceClipProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper plugin; diff --git a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h new file mode 100644 index 0000000..650b03f --- /dev/null +++ b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h @@ -0,0 +1,94 @@ +#ifndef __AQuickVoiceClip_H +#define __AQuickVoiceClip_H + +#include + +class AQuickVoiceClip : public LV2Plugin<1> { +public: + AQuickVoiceClip(double rate); + + void run(uint32_t num_samples); + + static constexpr const char * URI = "https://www.airwindows.com/aquickvoiceclip-vst"; + +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 LataLast6Sample; + double LataLast5Sample; + double LataLast4Sample; + double LataLast3Sample; + double LataLast2Sample; + double LataLast1Sample; + double LataHalfwaySample; + double LataHalfDrySample; + double LataHalfDiffSample; + double LataLastDiffSample; + double LataDrySample; + double LataDiffSample; + double LataPrevDiffSample; + + double RataLast6Sample; + double RataLast5Sample; + double RataLast4Sample; + double RataLast3Sample; + double RataLast2Sample; + double RataLast1Sample; + double RataHalfwaySample; + double RataHalfDrySample; + double RataHalfDiffSample; + double RataLastDiffSample; + double RataDrySample; + double RataDiffSample; + double RataPrevDiffSample; + + double ataK1; + double ataK2; + double ataK3; + double ataK4; + double ataK5; + double ataK6; + double ataK7; + double ataK8; //end antialiasing variables + + double LlastSample; + double LlastOutSample; + double LlastOut2Sample; + double LlastOut3Sample; + double LlpDepth; + double Lovershoot; + double Loverall; + double LiirSampleA; + double LiirSampleB; + double LiirSampleC; + double LiirSampleD; + + double RlastSample; + double RlastOutSample; + double RlastOut2Sample; + double RlastOut3Sample; + double RlpDepth; + double Rovershoot; + double Roverall; + double RiirSampleA; + double RiirSampleB; + double RiirSampleC; + double RiirSampleD; + bool flip; + + long double fpNShapeL; + long double fpNShapeR; + //default stuff + + float A; +}; + +#endif diff --git a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl new file mode 100644 index 0000000..47cca02 --- /dev/null +++ b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl @@ -0,0 +1,44 @@ +# Airwindows AQuickVoiceClip plugin description + +@prefix lv2: . +@prefix rdf: . +@prefix rdfs: . +@prefix units: . + + + a lv2:Plugin , + lv2:HighPassPlugin ; + 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 "Highpass" ; + lv2:default 0.42 ; + 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/AQuickVoiceClip/manifest.ttl.in b/plugins/LV2/src/AQuickVoiceClip/manifest.ttl.in new file mode 100644 index 0000000..171f0d8 --- /dev/null +++ b/plugins/LV2/src/AQuickVoiceClip/manifest.ttl.in @@ -0,0 +1,12 @@ +# LV2 Plugin manifest for airwindows AQuickVoiceClip plugin + +@prefix doap: . +@prefix lv2: . +@prefix rdfs: . + + + a lv2:Plugin ; + doap:name "Airwindows AQuickVoiceClip" ; + doap:license ; + lv2:binary ; + rdfs:seeAlso . -- cgit v1.2.3