diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-09-02 21:35:47 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-09-02 21:42:47 +0200 |
commit | cccd83938fd33631c36dd5e22ea2364a12fe5305 (patch) | |
tree | eac0433654c31ea6b31c295c74088b60dc7bf607 | |
parent | 529eff1742ef8e62bc8ccb402fcaa21eba7e2ff7 (diff) | |
download | airwindows-lv2-port-cccd83938fd33631c36dd5e22ea2364a12fe5305.tar.gz airwindows-lv2-port-cccd83938fd33631c36dd5e22ea2364a12fe5305.tar.bz2 airwindows-lv2-port-cccd83938fd33631c36dd5e22ea2364a12fe5305.zip |
LV2: Reset state on activate.
This makes sure all internal parameters are initializet to sane values
before processing starts. The VST version does this on construction, but
it seems better (at least for LV2) to do this as part of the activate
callback.
This should fix noise on the start of the audio processing with the
plugins.
26 files changed, 423 insertions, 36 deletions
diff --git a/plugins/LV2/src/ADClip7/ADClip7.cpp b/plugins/LV2/src/ADClip7/ADClip7.cpp index e568a30..5d5ad0d 100644 --- a/plugins/LV2/src/ADClip7/ADClip7.cpp +++ b/plugins/LV2/src/ADClip7/ADClip7.cpp @@ -5,11 +5,33 @@ ADClip7::ADClip7(double rate) : LV2Plugin(rate) - , refclipL(0.99) - , refclipR(0.99) { } +void ADClip7::activate() +{ + lastSampleL = 0.0; + lastSampleR = 0.0; + + for(int count = 0; count < 22199; count++) { + bL[count] = 0; + bR[count] = 0; + } + + gcount = 0; + lowsL = 0; + lowsR = 0; + refclipL = 0.99; + refclipR = 0.99; + iirLowsAL = 0.0; + iirLowsAR = 0.0; + iirLowsBL = 0.0; + iirLowsBR = 0.0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void ADClip7::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/ADClip7/ADClip7.h b/plugins/LV2/src/ADClip7/ADClip7.h index a92ebfd..c681849 100644 --- a/plugins/LV2/src/ADClip7/ADClip7.h +++ b/plugins/LV2/src/ADClip7/ADClip7.h @@ -8,6 +8,7 @@ class ADClip7 : public LV2Plugin<4> { public: ADClip7(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/adclip-7"; diff --git a/plugins/LV2/src/ADT/ADT.cpp b/plugins/LV2/src/ADT/ADT.cpp index 5f5e6e0..ba9549c 100644 --- a/plugins/LV2/src/ADT/ADT.cpp +++ b/plugins/LV2/src/ADT/ADT.cpp @@ -7,6 +7,21 @@ ADT::ADT(double rate) { } +void ADT::activate() +{ + for(int count = 0; count < 9999; count++) { + pL[count] = 0; + pR[count] = 0; + } + + offsetA = 9001; + offsetB = 9001; // :D + gcount = 0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void ADT::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/ADT/ADT.h b/plugins/LV2/src/ADT/ADT.h index fb6aab4..1b5e29e 100644 --- a/plugins/LV2/src/ADT/ADT.h +++ b/plugins/LV2/src/ADT/ADT.h @@ -8,6 +8,7 @@ class ADT : public LV2Plugin<6> { public: ADT(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/adt"; diff --git a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp index ac30296..2271128 100644 --- a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp +++ b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.cpp @@ -7,6 +7,56 @@ AQuickVoiceClip::AQuickVoiceClip(double rate) { } +void AQuickVoiceClip::activate() +{ + LataLast6Sample = LataLast5Sample = LataLast4Sample = 0.0; + LataLast3Sample = LataLast2Sample = LataLast1Sample = 0.0; + LataHalfwaySample = LataHalfDrySample = LataHalfDiffSample = 0.0; + LataDrySample = LataDiffSample = LataPrevDiffSample = 0.0; + + RataLast6Sample = RataLast5Sample = RataLast4Sample = 0.0; + RataLast3Sample = RataLast2Sample = RataLast1Sample = 0.0; + RataHalfwaySample = RataHalfDrySample = RataHalfDiffSample = 0.0; + RataDrySample = RataDiffSample = RataPrevDiffSample = 0.0; + + LlastSample = 0.0; + LlastOutSample = 0.0; + LlastOut2Sample = 0.0; + LlastOut3Sample = 0.0; + LlpDepth = 0.0; + Lovershoot = 0.0; + Loverall = 0; + LiirSampleA = 0.0; + LiirSampleB = 0.0; + LiirSampleC = 0.0; + LiirSampleD = 0.0; + + RlastSample = 0.0; + RlastOutSample = 0.0; + RlastOut2Sample = 0.0; + RlastOut3Sample = 0.0; + RlpDepth = 0.0; + Rovershoot = 0.0; + Roverall = 0; + RiirSampleA = 0.0; + RiirSampleB = 0.0; + RiirSampleC = 0.0; + RiirSampleD = 0.0; + flip = true; + + ataK1 = -0.646; //first FIR shaping of interpolated sample, brightens + ataK2 = 0.311; //second FIR shaping of interpolated sample, thickens + ataK6 = -0.093; //third FIR shaping of interpolated sample, brings air + ataK7 = 0.057; //fourth FIR shaping of interpolated sample, thickens + ataK8 = -0.023; //fifth FIR shaping of interpolated sample, brings air + ataK3 = 0.114; //add raw to interpolated dry, toughens + ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0 + ataK5 = 0.431; //subtract this much prev. diff sample, brightens. 0.431 becomes flat + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void AQuickVoiceClip::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h index 650b03f..b4789e6 100644 --- a/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h +++ b/plugins/LV2/src/AQuickVoiceClip/AQuickVoiceClip.h @@ -7,6 +7,7 @@ class AQuickVoiceClip : public LV2Plugin<1> { public: AQuickVoiceClip(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/aquickvoiceclip-vst"; diff --git a/plugins/LV2/src/Acceleration/Acceleration.cpp b/plugins/LV2/src/Acceleration/Acceleration.cpp index 3499537..429a6db 100644 --- a/plugins/LV2/src/Acceleration/Acceleration.cpp +++ b/plugins/LV2/src/Acceleration/Acceleration.cpp @@ -8,6 +8,21 @@ Acceleration::Acceleration(double rate) } +void Acceleration::activate() +{ + ataLastOutL = 0.0; + s1L = s2L = s3L = 0.0; + o1L = o2L = o3L = 0.0; + m1L = m2L = desL = 0.0; + + ataLastOutR = 0.0; + s1R = s2R = s3R = 0.0; + o1R = o2R = o3R = 0.0; + m1R = m2R = desR = 0.0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} void Acceleration::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/Acceleration/Acceleration.h b/plugins/LV2/src/Acceleration/Acceleration.h index a038a12..43ea318 100644 --- a/plugins/LV2/src/Acceleration/Acceleration.h +++ b/plugins/LV2/src/Acceleration/Acceleration.h @@ -9,6 +9,7 @@ class Acceleration : public LV2Plugin<2> { public: Acceleration(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/acceleration"; diff --git a/plugins/LV2/src/Air/Air.cpp b/plugins/LV2/src/Air/Air.cpp index 9a9e1e3..473f3d9 100644 --- a/plugins/LV2/src/Air/Air.cpp +++ b/plugins/LV2/src/Air/Air.cpp @@ -7,6 +7,55 @@ Air::Air(double rate) { } +void Air::activate() +{ + airPrevAL = 0.0; + airEvenAL = 0.0; + airOddAL = 0.0; + airFactorAL = 0.0; + airPrevBL = 0.0; + airEvenBL = 0.0; + airOddBL = 0.0; + airFactorBL = 0.0; + airPrevCL = 0.0; + airEvenCL = 0.0; + airOddCL = 0.0; + airFactorCL = 0.0; + tripletPrevL = 0.0; + tripletMidL = 0.0; + tripletAL = 0.0; + tripletBL = 0.0; + tripletCL = 0.0; + tripletFactorL = 0.0; + + airPrevAR = 0.0; + airEvenAR = 0.0; + airOddAR = 0.0; + airFactorAR = 0.0; + airPrevBR = 0.0; + airEvenBR = 0.0; + airOddBR = 0.0; + airFactorBR = 0.0; + airPrevCR = 0.0; + airEvenCR = 0.0; + airOddCR = 0.0; + airFactorCR = 0.0; + tripletPrevR = 0.0; + tripletMidR = 0.0; + tripletAR = 0.0; + tripletBR = 0.0; + tripletCR = 0.0; + tripletFactorR = 0.0; + + flipA = false; + flipB = false; + flop = false; + count = 1; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void Air::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/Air/Air.h b/plugins/LV2/src/Air/Air.h index 2ff3877..c4d9b61 100644 --- a/plugins/LV2/src/Air/Air.h +++ b/plugins/LV2/src/Air/Air.h @@ -8,6 +8,7 @@ class Air : public LV2Plugin<6> { public: Air(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/air"; diff --git a/plugins/LV2/src/Apicolypse/Apicolypse.cpp b/plugins/LV2/src/Apicolypse/Apicolypse.cpp index dcfa66e..de66ed6 100644 --- a/plugins/LV2/src/Apicolypse/Apicolypse.cpp +++ b/plugins/LV2/src/Apicolypse/Apicolypse.cpp @@ -7,6 +7,19 @@ Apicolypse::Apicolypse(double rate) { } +void Apicolypse::activate() +{ + for(int count = 0; count < 34; count++) { + bR[count] = 0; + bL[count] = 0; + } + + lastSampleR = 0.0; + lastSampleL = 0.0; + + fpd = 17; +} + void Apicolypse::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/Apicolypse/Apicolypse.h b/plugins/LV2/src/Apicolypse/Apicolypse.h index e0f2e45..0d7e56e 100644 --- a/plugins/LV2/src/Apicolypse/Apicolypse.h +++ b/plugins/LV2/src/Apicolypse/Apicolypse.h @@ -8,6 +8,7 @@ class Apicolypse : public LV2Plugin<4> { public: Apicolypse(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/apicolypse"; diff --git a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp index c6465fe..c5a15cf 100644 --- a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp +++ b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.cpp @@ -4,25 +4,60 @@ AtmosphereBuss::AtmosphereBuss(double rate) : LV2Plugin(rate) - , gainchase(-90.0) - , settingchase(-90.0) - , chasespeed(350.0) - , thresholdA(0.618033988749894) - , thresholdB(0.679837387624884) - , thresholdC(0.747821126387373) - , thresholdD(0.82260323902611) - , thresholdE(0.904863562928721) - , thresholdF(0.995349919221593) - , thresholdG(1.094884911143752) - , thresholdH(1.204373402258128) - , thresholdI(1.32481074248394) - , thresholdJ(1.457291816732335) - , thresholdK(1.603020998405568) - , thresholdL(1.763323098246125) - , thresholdM(1.939655408070737) { } +void AtmosphereBuss::activate() +{ + gainchase = -90.0; + settingchase = -90.0; + chasespeed = 350.0; + + fpNShapeL = 0.0; + lastSampleAL = 0.0; + lastSampleBL = 0.0; + lastSampleCL = 0.0; + lastSampleDL = 0.0; + lastSampleEL = 0.0; + lastSampleFL = 0.0; + lastSampleGL = 0.0; + lastSampleHL = 0.0; + lastSampleIL = 0.0; + lastSampleJL = 0.0; + lastSampleKL = 0.0; + lastSampleLL = 0.0; + lastSampleML = 0.0; + + fpNShapeR = 0.0; + lastSampleAR = 0.0; + lastSampleBR = 0.0; + lastSampleCR = 0.0; + lastSampleDR = 0.0; + lastSampleER = 0.0; + lastSampleFR = 0.0; + lastSampleGR = 0.0; + lastSampleHR = 0.0; + lastSampleIR = 0.0; + lastSampleJR = 0.0; + lastSampleKR = 0.0; + lastSampleLR = 0.0; + lastSampleMR = 0.0; + + thresholdA = 0.618033988749894; + thresholdB = 0.679837387624884; + thresholdC = 0.747821126387373; + thresholdD = 0.82260323902611; + thresholdE = 0.904863562928721; + thresholdF = 0.995349919221593; + thresholdG = 1.094884911143752; + thresholdH = 1.204373402258128; + thresholdI = 1.32481074248394; + thresholdJ = 1.457291816732335; + thresholdK = 1.603020998405568; + thresholdL = 1.763323098246125; + thresholdM = 1.939655408070737; +} + void AtmosphereBuss::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h index 52dd36e..b1d61df 100644 --- a/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h +++ b/plugins/LV2/src/AtmosphereBuss/AtmosphereBuss.h @@ -7,6 +7,7 @@ class AtmosphereBuss : public LV2Plugin<1> { public: AtmosphereBuss(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/atmospherebuss"; diff --git a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp index 81709e7..a2cd9de 100644 --- a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp +++ b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.cpp @@ -4,25 +4,60 @@ AtmosphereChannel::AtmosphereChannel(double rate) : LV2Plugin(rate) - , gainchase(-90.0) - , settingchase(-90.0) - , chasespeed(350.0) - , thresholdA(0.618033988749894) - , thresholdB(0.679837387624884) - , thresholdC(0.747821126387373) - , thresholdD(0.82260323902611) - , thresholdE(0.904863562928721) - , thresholdF(0.995349919221593) - , thresholdG(1.094884911143752) - , thresholdH(1.204373402258128) - , thresholdI(1.32481074248394) - , thresholdJ(1.457291816732335) - , thresholdK(1.603020998405568) - , thresholdL(1.763323098246125) - , thresholdM(1.939655408070737) { } +void AtmosphereChannel::activate() +{ + gainchase = -90.0; + settingchase = -90.0; + chasespeed = 350.0; + + fpNShapeL = 0.0; + lastSampleAL = 0.0; + lastSampleBL = 0.0; + lastSampleCL = 0.0; + lastSampleDL = 0.0; + lastSampleEL = 0.0; + lastSampleFL = 0.0; + lastSampleGL = 0.0; + lastSampleHL = 0.0; + lastSampleIL = 0.0; + lastSampleJL = 0.0; + lastSampleKL = 0.0; + lastSampleLL = 0.0; + lastSampleML = 0.0; + + fpNShapeR = 0.0; + lastSampleAR = 0.0; + lastSampleBR = 0.0; + lastSampleCR = 0.0; + lastSampleDR = 0.0; + lastSampleER = 0.0; + lastSampleFR = 0.0; + lastSampleGR = 0.0; + lastSampleHR = 0.0; + lastSampleIR = 0.0; + lastSampleJR = 0.0; + lastSampleKR = 0.0; + lastSampleLR = 0.0; + lastSampleMR = 0.0; + + thresholdA = 0.618033988749894; + thresholdB = 0.679837387624884; + thresholdC = 0.747821126387373; + thresholdD = 0.82260323902611; + thresholdE = 0.904863562928721; + thresholdF = 0.995349919221593; + thresholdG = 1.094884911143752; + thresholdH = 1.204373402258128; + thresholdI = 1.32481074248394; + thresholdJ = 1.457291816732335; + thresholdK = 1.603020998405568; + thresholdL = 1.763323098246125; + thresholdM = 1.939655408070737; +} + void AtmosphereChannel::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h index 2d24a6e..b7600be 100644 --- a/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h +++ b/plugins/LV2/src/AtmosphereChannel/AtmosphereChannel.h @@ -7,6 +7,7 @@ class AtmosphereChannel : public LV2Plugin<1> { public: AtmosphereChannel(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/atmospherechannel"; diff --git a/plugins/LV2/src/Aura/Aura.cpp b/plugins/LV2/src/Aura/Aura.cpp index cb205ce..78f650d 100644 --- a/plugins/LV2/src/Aura/Aura.cpp +++ b/plugins/LV2/src/Aura/Aura.cpp @@ -7,6 +7,22 @@ Aura::Aura(double rate) { } +void Aura::activate() +{ + for(int count = 0; count < 21; count++) { + bL[count] = 0.0; + bR[count] = 0.0; + f[count] = 0.0; + } + lastSampleL = 0.0; + previousVelocityL = 0.0; + lastSampleR = 0.0; + previousVelocityR = 0.0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void Aura::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/Aura/Aura.h b/plugins/LV2/src/Aura/Aura.h index 5692234..5328ffb 100644 --- a/plugins/LV2/src/Aura/Aura.h +++ b/plugins/LV2/src/Aura/Aura.h @@ -7,6 +7,7 @@ class Aura : public LV2Plugin<2> { public: Aura(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/aura"; diff --git a/plugins/LV2/src/AverMatrix/AverMatrix.cpp b/plugins/LV2/src/AverMatrix/AverMatrix.cpp index 2c6493c..4c3dba8 100644 --- a/plugins/LV2/src/AverMatrix/AverMatrix.cpp +++ b/plugins/LV2/src/AverMatrix/AverMatrix.cpp @@ -7,6 +7,19 @@ AverMatrix::AverMatrix(double rate) { } +void AverMatrix::activate() +{ + for(int x = 0; x < 11; x++) { + f[x] = 0.0; + for (int y = 0; y < 11; y++) { + bL[x][y] = 0.0; + bR[x][y] = 0.0; + } + } + + fpd = 17; +} + void AverMatrix::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/AverMatrix/AverMatrix.h b/plugins/LV2/src/AverMatrix/AverMatrix.h index 548efe8..d28f9d5 100644 --- a/plugins/LV2/src/AverMatrix/AverMatrix.h +++ b/plugins/LV2/src/AverMatrix/AverMatrix.h @@ -7,6 +7,7 @@ class AverMatrix : public LV2Plugin<3> { public: AverMatrix(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/avermatrix"; diff --git a/plugins/LV2/src/Average/Average.cpp b/plugins/LV2/src/Average/Average.cpp index 5155b16..b485576 100644 --- a/plugins/LV2/src/Average/Average.cpp +++ b/plugins/LV2/src/Average/Average.cpp @@ -7,6 +7,18 @@ Average::Average(double rate) { } +void Average::activate() +{ + for(int count = 0; count < 11; count++) { + bL[count] = 0.0; + bR[count] = 0.0; + f[count] = 0.0; + } + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void Average::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/Average/Average.h b/plugins/LV2/src/Average/Average.h index e7bc673..9c35897 100644 --- a/plugins/LV2/src/Average/Average.h +++ b/plugins/LV2/src/Average/Average.h @@ -7,6 +7,7 @@ class Average : public LV2Plugin<2> { public: Average(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/average"; diff --git a/plugins/LV2/src/BassDrive/BassDrive.cpp b/plugins/LV2/src/BassDrive/BassDrive.cpp index 9d296eb..325962b 100644 --- a/plugins/LV2/src/BassDrive/BassDrive.cpp +++ b/plugins/LV2/src/BassDrive/BassDrive.cpp @@ -4,10 +4,52 @@ BassDrive::BassDrive(double rate) : LV2Plugin(rate) - , fpd(17) { } +void BassDrive::activate() +{ + for (int fcount = 0; fcount < 7; fcount++) + { + presenceInAL[fcount] = 0.0; + presenceOutAL[fcount] = 0.0; + highInAL[fcount] = 0.0; + highOutAL[fcount] = 0.0; + midInAL[fcount] = 0.0; + midOutAL[fcount] = 0.0; + lowInAL[fcount] = 0.0; + lowOutAL[fcount] = 0.0; + presenceInBL[fcount] = 0.0; + presenceOutBL[fcount] = 0.0; + highInBL[fcount] = 0.0; + highOutBL[fcount] = 0.0; + midInBL[fcount] = 0.0; + midOutBL[fcount] = 0.0; + lowInBL[fcount] = 0.0; + lowOutBL[fcount] = 0.0; + + presenceInAR[fcount] = 0.0; + presenceOutAR[fcount] = 0.0; + highInAR[fcount] = 0.0; + highOutAR[fcount] = 0.0; + midInAR[fcount] = 0.0; + midOutAR[fcount] = 0.0; + lowInAR[fcount] = 0.0; + lowOutAR[fcount] = 0.0; + presenceInBR[fcount] = 0.0; + presenceOutBR[fcount] = 0.0; + highInBR[fcount] = 0.0; + highOutBR[fcount] = 0.0; + midInBR[fcount] = 0.0; + midOutBR[fcount] = 0.0; + lowInBR[fcount] = 0.0; + lowOutBR[fcount] = 0.0; + } + + flip = false; + fpd = 17; +} + void BassDrive::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/BassDrive/BassDrive.h b/plugins/LV2/src/BassDrive/BassDrive.h index 73665c4..484254a 100644 --- a/plugins/LV2/src/BassDrive/BassDrive.h +++ b/plugins/LV2/src/BassDrive/BassDrive.h @@ -7,6 +7,7 @@ class BassDrive : public LV2Plugin<5> { public: BassDrive(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/bassdrive"; diff --git a/plugins/LV2/src/BassKit/BassKit.cpp b/plugins/LV2/src/BassKit/BassKit.cpp index d3a2896..86fe203 100644 --- a/plugins/LV2/src/BassKit/BassKit.cpp +++ b/plugins/LV2/src/BassKit/BassKit.cpp @@ -4,10 +4,67 @@ BassKit::BassKit(double rate) : LV2Plugin(rate) - , oscGate(1.0) { } +void BassKit::activate() +{ + WasNegative = false; + SubOctave = false; + flip = false; + bflip = 0; + + iirDriveSampleA = 0.0; + iirDriveSampleB = 0.0; + iirDriveSampleC = 0.0; + iirDriveSampleD = 0.0; + iirDriveSampleE = 0.0; + iirDriveSampleF = 0.0; + + iirHeadBumpA = 0.0; + iirHeadBumpB = 0.0; + iirHeadBumpC = 0.0; + + iirSubBumpA = 0.0; + iirSubBumpB = 0.0; + iirSubBumpC = 0.0; + + lastHeadBump = 0.0; + lastSubBump = 0.0; + + iirSampleA = 0.0; + iirSampleB = 0.0; + iirSampleC = 0.0; + iirSampleD = 0.0; + iirSampleE = 0.0; + iirSampleF = 0.0; + iirSampleG = 0.0; + iirSampleH = 0.0; + iirSampleI = 0.0; + iirSampleJ = 0.0; + iirSampleK = 0.0; + iirSampleL = 0.0; + iirSampleM = 0.0; + iirSampleN = 0.0; + iirSampleO = 0.0; + iirSampleP = 0.0; + iirSampleQ = 0.0; + iirSampleR = 0.0; + iirSampleS = 0.0; + iirSampleT = 0.0; + iirSampleU = 0.0; + iirSampleV = 0.0; + iirSampleW = 0.0; + iirSampleX = 0.0; + iirSampleY = 0.0; + iirSampleZ = 0.0; + + oscGate = 1.0; + + fpNShapeL = 0.0; + fpNShapeR = 0.0; +} + void BassKit::run(uint32_t num_samples) { A = *params[0]; diff --git a/plugins/LV2/src/BassKit/BassKit.h b/plugins/LV2/src/BassKit/BassKit.h index a5d5d12..9f377dd 100644 --- a/plugins/LV2/src/BassKit/BassKit.h +++ b/plugins/LV2/src/BassKit/BassKit.h @@ -7,6 +7,7 @@ class BassKit : public LV2Plugin<4> { public: BassKit(double rate); + void activate() override; void run(uint32_t num_samples); static constexpr const char * URI = "https://www.airwindows.com/basskit"; |