diff options
Diffstat (limited to 'plugins/LV2/src/Smooth/Smooth.cpp')
-rw-r--r-- | plugins/LV2/src/Smooth/Smooth.cpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/plugins/LV2/src/Smooth/Smooth.cpp b/plugins/LV2/src/Smooth/Smooth.cpp new file mode 100644 index 0000000..9e796b4 --- /dev/null +++ b/plugins/LV2/src/Smooth/Smooth.cpp @@ -0,0 +1,59 @@ +#include "Smooth.h" +#include <iostream> +#include <lv2wrapper.h> + +Smooth::Smooth(double rate) + : LV2Plugin(rate) +{ +} + +void Smooth::activate() +{ + A = 0.0; + B = 1.0; + C = 1.0; + + lastSampleAL = 0.0; + gainAL = 1.0; + lastSampleBL = 0.0; + gainBL = 1.0; + lastSampleCL = 0.0; + gainCL = 1.0; + lastSampleDL = 0.0; + gainDL = 1.0; + lastSampleEL = 0.0; + gainEL = 1.0; + + lastSampleAR = 0.0; + gainAR = 1.0; + lastSampleBR = 0.0; + gainBR = 1.0; + lastSampleCR = 0.0; + gainCR = 1.0; + lastSampleDR = 0.0; + gainDR = 1.0; + lastSampleER = 0.0; + gainER = 1.0; + + fpd = 17; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Smooth::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + + processReplacing(const_cast<float **>(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include <cmath> +#include "../../../LinuxVST/src/Smooth/SmoothProc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper<Smooth> plugin; |