diff options
Diffstat (limited to 'plugins/LV2/src/Slew2/Slew2.cpp')
-rw-r--r-- | plugins/LV2/src/Slew2/Slew2.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/LV2/src/Slew2/Slew2.cpp b/plugins/LV2/src/Slew2/Slew2.cpp new file mode 100644 index 0000000..ad79c99 --- /dev/null +++ b/plugins/LV2/src/Slew2/Slew2.cpp @@ -0,0 +1,47 @@ +#include "Slew2.h" +#include <iostream> +#include <lv2wrapper.h> + +Slew2::Slew2(double rate) + : LV2Plugin(rate) +{ +} + +void Slew2::activate() +{ + A = 0.0; + + LataLast3Sample = LataLast2Sample = LataLast1Sample = 0.0; + LataHalfwaySample = LataHalfDrySample = LataHalfDiffSample = 0.0; + LataA = LataB = LataC = LataDrySample = LataDiffSample = LataPrevDiffSample = 0.0; + LataUpsampleHighTweak = 0.0414213562373095048801688; //more adds treble to upsampling + LataDecay = 0.915965594177219015; //Catalan's constant, more adds focus and clarity + lastSampleL = 0.0; + + RataLast3Sample = RataLast2Sample = RataLast1Sample = 0.0; + RataHalfwaySample = RataHalfDrySample = RataHalfDiffSample = 0.0; + RataA = RataB = RataC = RataDrySample = RataDiffSample = RataPrevDiffSample = 0.0; + RataUpsampleHighTweak = 0.0414213562373095048801688; //more adds treble to upsampling + RataDecay = 0.915965594177219015; //CRatalan's constant, more adds focus and clarity + LataFlip = false; //end reset of antialias parameters + RataFlip = false; //end reset of antialias parameters + lastSampleR = 0.0; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void Slew2::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/Slew2/Slew2Proc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper<Slew2> plugin; |