aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-07-20 23:49:56 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-07-20 23:51:43 +0200
commit74b313b3d08e4cf88e55d246fbea4fe39ab49709 (patch)
tree07caa16e72e204fe79d7603b9280c8b1b9c01268
parentff58303c06841c0c8b796ad2cca5db066bb27465 (diff)
downloadairwindows-lv2-port-74b313b3d08e4cf88e55d246fbea4fe39ab49709.tar.gz
airwindows-lv2-port-74b313b3d08e4cf88e55d246fbea4fe39ab49709.tar.bz2
airwindows-lv2-port-74b313b3d08e4cf88e55d246fbea4fe39ab49709.zip
LV2: Add plugin AQuickVoiceClip
-rwxr-xr-xplugins/LV2/CMakeLists.txt3
-rw-r--r--plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp24
-rw-r--r--plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h94
-rw-r--r--plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.ttl44
-rw-r--r--plugins/LV2/src/AQuickVoiceClip/manifest.ttl.in12
5 files changed, 176 insertions, 1 deletions
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 <iostream>
+#include <lv2wrapper.h>
+
+AQuickVoiceClip::AQuickVoiceClip(double rate)
+ : LV2Plugin(rate)
+{
+}
+
+void AQuickVoiceClip::run(uint32_t num_samples)
+{
+ A = *params[0];
+
+ processReplacing(const_cast<float **>(in), out, num_samples);
+}
+
+//
+// Include the processing code from the VST version.
+//
+#include <cmath>
+#include "../../../LinuxVST/src/AQuickVoiceClip/AQuickVoiceClipProc.cpp"
+
+// Create the LV2Wrapper and register the plugin
+LV2Wrapper<AQuickVoiceClip> 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 <lv2plugin.h>
+
+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: <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/aquickvoiceclip-vst>
+ a lv2:Plugin ,
+ lv2:HighPassPlugin ;
+ 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 "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: <http://usefulinc.com/ns/doap#> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+<https://www.airwindows.com/aquickvoiceclip-vst>
+ a lv2:Plugin ;
+ doap:name "Airwindows AQuickVoiceClip" ;
+ doap:license <http://opensource.org/licenses/mit> ;
+ lv2:binary <AQuickVoiceClip@CMAKE_SHARED_LIBRARY_SUFFIX@> ;
+ rdfs:seeAlso <AQuickVoiceClip.ttl> .