diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-07-31 21:34:28 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-07-31 21:34:28 +0200 |
commit | 1bd34fa795d0eac15d0dc9d4c756f19fc6624872 (patch) | |
tree | fdb9bb2e5e20a0adb2953597beafd66aa7c924fc /plugins/LV2/src/IronOxide5/IronOxide5.cpp | |
parent | 94a6cc3d6c70883e08fd7be16e9405d44bfb94e5 (diff) | |
download | airwindows-lv2-port-1bd34fa795d0eac15d0dc9d4c756f19fc6624872.tar.gz airwindows-lv2-port-1bd34fa795d0eac15d0dc9d4c756f19fc6624872.tar.bz2 airwindows-lv2-port-1bd34fa795d0eac15d0dc9d4c756f19fc6624872.zip |
LV2: Port another batch of plugins, EQ - SurgeTide
Some plugins won't compile for various reasons, these have been left out
for now. One plugin failed autoporting, so that one's left out too.
I have not tested these plugins yet, so no guarantees that they work, or
that they work right. Please report any problems or if there's missing
control info to the mailing list.
Diffstat (limited to 'plugins/LV2/src/IronOxide5/IronOxide5.cpp')
-rw-r--r-- | plugins/LV2/src/IronOxide5/IronOxide5.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/plugins/LV2/src/IronOxide5/IronOxide5.cpp b/plugins/LV2/src/IronOxide5/IronOxide5.cpp new file mode 100644 index 0000000..77a9424 --- /dev/null +++ b/plugins/LV2/src/IronOxide5/IronOxide5.cpp @@ -0,0 +1,71 @@ +#include "IronOxide5.h" +#include <iostream> +#include <lv2wrapper.h> + +IronOxide5::IronOxide5(double rate) + : LV2Plugin(rate) +{ +} + +void IronOxide5::activate() +{ + A = 0.5; //0.0 input trim in dB -18 to +18, default 0 ((A*36.0)-18.0) + B = 0.562341325190349; //15.0 ips 1.5 to 150.0 logarithmic. B*B + C = 0.562341325190349; // (C*C) * (C*C) * 150 gives 15 ips (clamp to 1.5 minimum) + //15.0 (0.316227766016838)squared * 150 gives 15 ips + D = 0.5; //0.5 flutter 0 to 1 + E = 0.5; //0.5 noise 0 to 1 + F = 0.5; //0.0 output trim in dB -18 to +18, default 0 ((E*36.0)-18.0) + G = 1.0; //1.0 inv/dry/wet -1 0 1 ((F*2.0)-1.0) + //needs very fussy defaults to comply with unusual defaults + + for (int temp = 0; temp < 263; temp++) {dL[temp] = 0.0; dR[temp] = 0.0;} + gcount = 0; + + fastIIRAL = fastIIRBL = slowIIRAL = slowIIRBL = 0.0; + fastIIHAL = fastIIHBL = slowIIHAL = slowIIHBL = 0.0; + iirSamplehAL = iirSamplehBL = 0.0; + iirSampleAL = iirSampleBL = 0.0; + prevInputSampleL = 0.0; + + fastIIRAR = fastIIRBR = slowIIRAR = slowIIRBR = 0.0; + fastIIHAR = fastIIHBR = slowIIHAR = slowIIHBR = 0.0; + iirSamplehAR = iirSamplehBR = 0.0; + iirSampleAR = iirSampleBR = 0.0; + prevInputSampleR = 0.0; + + flip = false; + for (int temp = 0; temp < 99; temp++) {flL[temp] = 0.0; flR[temp] = 0.0;} + + fstoredcount = 0; + sweep = 0.0; + rateof = 0.5; + nextmax = 0.5; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; + //this is reset: values being initialized only once. Startup values, whatever they are. + +} + +void IronOxide5::run(uint32_t num_samples) +{ + A = *params[0]; + B = *params[1]; + C = *params[2]; + D = *params[3]; + E = *params[4]; + F = *params[5]; + G = *params[6]; + + processReplacing(const_cast<float **>(in), out, num_samples); +} + +// +// Include the processing code from the VST version. +// +#include <cmath> +#include "../../../LinuxVST/src/IronOxide5/IronOxide5Proc.cpp" + +// Create the LV2Wrapper and register the plugin +LV2Wrapper<IronOxide5> plugin; |