Skip to content

Commit

Permalink
Update to Latest Airwin
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Oct 22, 2023
1 parent 1e9289b commit 26c27c7
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 151 deletions.
2 changes: 1 addition & 1 deletion libs/airwindows
Submodule airwindows updated 34 files
+8 −2 Airwindopedia.txt
+1 −1 plugins/LinuxVST/src/ConsoleMCBuss/ConsoleMCBuss.cpp
+3 −55 plugins/LinuxVST/src/ConsoleMCBuss/ConsoleMCBuss.h
+40 −82 plugins/LinuxVST/src/ConsoleMCBuss/ConsoleMCBussProc.cpp
+21 −42 plugins/MacAU/ConsoleMCBuss/ConsoleMCBuss.cpp
+4 −56 plugins/MacAU/ConsoleMCBuss/ConsoleMCBuss.h
+21 −43 plugins/MacAU/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.pbxuser
+17 −18 plugins/MacAU/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.perspectivev3
+21 −42 plugins/MacSignedAU/ConsoleMCBuss/ConsoleMCBuss.cpp
+4 −56 plugins/MacSignedAU/ConsoleMCBuss/ConsoleMCBuss.h
+21 −43 plugins/MacSignedAU/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.pbxuser
+17 −18 plugins/MacSignedAU/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.perspectivev3
+538 −538 plugins/MacSignedAU/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/project.pbxproj
+ ...Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate
+ ...nnel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate
+28 −38 plugins/MacSignedVST/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.pbxuser
+20 −58 plugins/MacSignedVST/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.perspectivev3
+49 −49 plugins/MacSignedVST/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/project.pbxproj
+ ...Buss.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate
+1 −1 plugins/MacSignedVST/ConsoleMCBuss/source/ConsoleMCBuss.cpp
+3 −55 plugins/MacSignedVST/ConsoleMCBuss/source/ConsoleMCBuss.h
+40 −82 plugins/MacSignedVST/ConsoleMCBuss/source/ConsoleMCBussProc.cpp
+ ...nnel.xcodeproj/project.xcworkspace/xcuserdata/christopherjohnson.xcuserdatad/UserInterfaceState.xcuserstate
+2 −2 ...s/MacSignedVST/ConsoleMCChannel/ConsoleMCChannel.xcodeproj/xcshareddata/xcschemes/ConsoleMCChannel.xcscheme
+28 −38 plugins/MacVST/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.pbxuser
+20 −58 plugins/MacVST/ConsoleMCBuss/ConsoleMCBuss.xcodeproj/christopherjohnson.perspectivev3
+1 −1 plugins/MacVST/ConsoleMCBuss/source/ConsoleMCBuss.cpp
+3 −55 plugins/MacVST/ConsoleMCBuss/source/ConsoleMCBuss.h
+40 −82 plugins/MacVST/ConsoleMCBuss/source/ConsoleMCBussProc.cpp
+ plugins/WinVST/ConsoleMCBuss/.vs/VSTProject/v14/.suo
+1 −1 plugins/WinVST/ConsoleMCBuss/ConsoleMCBuss.cpp
+3 −55 plugins/WinVST/ConsoleMCBuss/ConsoleMCBuss.h
+40 −82 plugins/WinVST/ConsoleMCBuss/ConsoleMCBussProc.cpp
+1 −0 what.txt
7 changes: 7 additions & 0 deletions res/awpdoc/YNotBandpass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# YNotBandpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.

YNotBandpass has various uses. One I was trying out in the original video, was setting it up as a ‘walkie-talkie’ sort of tone on my voice, and then turning up ResEdge to really trash the hell out of the audio in a characteristic way that’s not easily found anywhere else.

In the video for YNotBandpass, the version without control smoothing, I demoed it on a bunch of huge reverb, alternating between a Bricasti Cathedral and my version of that same sound… and the more rapid switching between Freq settings turns out to sound pretty nice! Except when the ResEdge control is used to give a mean, electrical, circuit-bendy quality that still retains a lot of the depth of the underlying sound.


2 changes: 1 addition & 1 deletion res/awpdoc/YNotHighpass.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering.
# YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.

See YNotLowpass, except it’s a highpass :) interestingly, the original YHighpass saw some significant improvements in CPU usage. Turns out that going to YNot mode, with no control smoothing, boosts performance even more.

Expand Down
22 changes: 11 additions & 11 deletions src/ModuleAdd.h
Original file line number Diff line number Diff line change
Expand Up @@ -677,31 +677,31 @@ int Weight_unused = AirwinRegistry::registerAirwindow({"Weight", "Filter", 202,
#include "autogen_airwin/Wider.h"
int Wider_unused = AirwinRegistry::registerAirwindow({"Wider", "Stereo", 277, "Wider is Airwindows stereo space shaping.", airwin2rack::Wider::kNumParameters, []() { return std::make_unique<airwin2rack::Wider::Wider>(0); }});
#include "autogen_airwin/XBandpass.h"
int XBandpass_unused = AirwinRegistry::registerAirwindow({"XBandpass", "XYZ Filters", 361, "XBandpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::XBandpass::XBandpass>(0); }});
int XBandpass_unused = AirwinRegistry::registerAirwindow({"XBandpass", "XYZ Filters", 362, "XBandpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::XBandpass::XBandpass>(0); }});
#include "autogen_airwin/XHighpass.h"
int XHighpass_unused = AirwinRegistry::registerAirwindow({"XHighpass", "XYZ Filters", 362, "XHighpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::XHighpass::XHighpass>(0); }});
int XHighpass_unused = AirwinRegistry::registerAirwindow({"XHighpass", "XYZ Filters", 363, "XHighpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::XHighpass::XHighpass>(0); }});
#include "autogen_airwin/XLowpass.h"
int XLowpass_unused = AirwinRegistry::registerAirwindow({"XLowpass", "XYZ Filters", 363, "XLowpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::XLowpass::XLowpass>(0); }});
int XLowpass_unused = AirwinRegistry::registerAirwindow({"XLowpass", "XYZ Filters", 364, "XLowpass is a distorted digital EQ, inspired by retro sampler DSP.", airwin2rack::XLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::XLowpass::XLowpass>(0); }});
#include "autogen_airwin/XNotch.h"
int XNotch_unused = AirwinRegistry::registerAirwindow({"XNotch", "XYZ Filters", 364, "XNotch is a distorted digital EQ, not as glitchy as the others.", airwin2rack::XNotch::kNumParameters, []() { return std::make_unique<airwin2rack::XNotch::XNotch>(0); }});
int XNotch_unused = AirwinRegistry::registerAirwindow({"XNotch", "XYZ Filters", 365, "XNotch is a distorted digital EQ, not as glitchy as the others.", airwin2rack::XNotch::kNumParameters, []() { return std::make_unique<airwin2rack::XNotch::XNotch>(0); }});
#include "autogen_airwin/XRegion.h"
int XRegion_unused = AirwinRegistry::registerAirwindow({"XRegion", "XYZ Filters", 365, "XRegion is distorted staggered bandpasses, for extreme soundmangling.", airwin2rack::XRegion::kNumParameters, []() { return std::make_unique<airwin2rack::XRegion::XRegion>(0); }});
int XRegion_unused = AirwinRegistry::registerAirwindow({"XRegion", "XYZ Filters", 366, "XRegion is distorted staggered bandpasses, for extreme soundmangling.", airwin2rack::XRegion::kNumParameters, []() { return std::make_unique<airwin2rack::XRegion::XRegion>(0); }});
#include "autogen_airwin/YBandpass.h"
int YBandpass_unused = AirwinRegistry::registerAirwindow({"YBandpass", "XYZ Filters", 355, "YBandpass is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::YBandpass::YBandpass>(0); }});
#include "autogen_airwin/YHighpass.h"
int YHighpass_unused = AirwinRegistry::registerAirwindow({"YHighpass", "XYZ Filters", 356, "YHighpass is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::YHighpass::YHighpass>(0); }});
int YHighpass_unused = AirwinRegistry::registerAirwindow({"YHighpass", "XYZ Filters", 357, "YHighpass is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::YHighpass::YHighpass>(0); }});
#include "autogen_airwin/YLowpass.h"
int YLowpass_unused = AirwinRegistry::registerAirwindow({"YLowpass", "XYZ Filters", 358, "YLowpass is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::YLowpass::YLowpass>(0); }});
int YLowpass_unused = AirwinRegistry::registerAirwindow({"YLowpass", "XYZ Filters", 359, "YLowpass is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::YLowpass::YLowpass>(0); }});
#include "autogen_airwin/YNotBandpass.h"
int YNotBandpass_unused = AirwinRegistry::registerAirwindow({"YNotBandpass", "Unclassified", -1, "", airwin2rack::YNotBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotBandpass::YNotBandpass>(0); }});
int YNotBandpass_unused = AirwinRegistry::registerAirwindow({"YNotBandpass", "XYZ Filters", 356, "YNotBandpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwin2rack::YNotBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotBandpass::YNotBandpass>(0); }});
#include "autogen_airwin/YNotHighpass.h"
int YNotHighpass_unused = AirwinRegistry::registerAirwindow({"YNotHighpass", "XYZ Filters", 357, "YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwin2rack::YNotHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotHighpass::YNotHighpass>(0); }});
int YNotHighpass_unused = AirwinRegistry::registerAirwindow({"YNotHighpass", "XYZ Filters", 358, "YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwin2rack::YNotHighpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotHighpass::YNotHighpass>(0); }});
#include "autogen_airwin/YNotLowpass.h"
int YNotLowpass_unused = AirwinRegistry::registerAirwindow({"YNotLowpass", "XYZ Filters", 359, "YNotLowpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwin2rack::YNotLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotLowpass::YNotLowpass>(0); }});
int YNotLowpass_unused = AirwinRegistry::registerAirwindow({"YNotLowpass", "XYZ Filters", 360, "YNotLowpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwin2rack::YNotLowpass::kNumParameters, []() { return std::make_unique<airwin2rack::YNotLowpass::YNotLowpass>(0); }});
#include "autogen_airwin/YNotNotch.h"
int YNotNotch_unused = AirwinRegistry::registerAirwindow({"YNotNotch", "Unclassified", -1, "", airwin2rack::YNotNotch::kNumParameters, []() { return std::make_unique<airwin2rack::YNotNotch::YNotNotch>(0); }});
#include "autogen_airwin/YNotch.h"
int YNotch_unused = AirwinRegistry::registerAirwindow({"YNotch", "XYZ Filters", 360, "YNotch is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YNotch::kNumParameters, []() { return std::make_unique<airwin2rack::YNotch::YNotch>(0); }});
int YNotch_unused = AirwinRegistry::registerAirwindow({"YNotch", "XYZ Filters", 361, "YNotch is soft and smooth to nasty, edgy texture-varying filtering.", airwin2rack::YNotch::kNumParameters, []() { return std::make_unique<airwin2rack::YNotch::YNotch>(0); }});
#include "autogen_airwin/ZBandpass.h"
int ZBandpass_unused = AirwinRegistry::registerAirwindow({"ZBandpass", "XYZ Filters", 350, "ZBandpass is a bandpass made to sound and act like the Emu e6400 Ultra bandpass.", airwin2rack::ZBandpass::kNumParameters, []() { return std::make_unique<airwin2rack::ZBandpass::ZBandpass>(0); }});
#include "autogen_airwin/ZBandpass2.h"
Expand Down
2 changes: 1 addition & 1 deletion src/autogen_airwin/ConsoleMCBuss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ConsoleMCBuss::ConsoleMCBuss(audioMasterCallback audioMaster) :
{
A = 1.0;

for (int x = 0; x < gslew_total; x++) gslew[x] = 0.0;
lastSinewL = lastSinewR = 0.0;
subAL = subAR = subBL = subBR = subCL = subCR = subDL = subDR = 0.0;
gainA = gainB = 1.0;

Expand Down
58 changes: 3 additions & 55 deletions src/autogen_airwin/ConsoleMCBuss.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,61 +54,9 @@ class ConsoleMCBuss :
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;

enum {
prevSampL1,
prevSampR1,
invSampL1,
invSampR1,
threshold1,
prevSampL2,
prevSampR2,
invSampL2,
invSampR2,
threshold2,
prevSampL3,
prevSampR3,
invSampL3,
invSampR3,
threshold3,
prevSampL4,
prevSampR4,
invSampL4,
invSampR4,
threshold4,
prevSampL5,
prevSampR5,
invSampL5,
invSampR5,
threshold5,
prevSampL6,
prevSampR6,
invSampL6,
invSampR6,
threshold6,
prevSampL7,
prevSampR7,
invSampL7,
invSampR7,
threshold7,
prevSampL8,
prevSampR8,
invSampL8,
invSampR8,
threshold8,
prevSampL9,
prevSampR9,
invSampL9,
invSampR9,
threshold9,
prevSampL10,
prevSampR10,
invSampL10,
invSampR10,
threshold10,
gslew_total
}; //fixed frequency pear filter for ultrasonics, stereo
double gslew[gslew_total]; //probably worth just using a number here

double lastSinewL;
double lastSinewR;

double subAL;
double subAR;
double subBL;
Expand Down
122 changes: 40 additions & 82 deletions src/autogen_airwin/ConsoleMCBussProc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,17 @@ void ConsoleMCBuss::processReplacing(float **inputs, float **outputs, VstInt32 s
double overallscale = 1.0;
overallscale /= 44100.0;
overallscale *= getSampleRate();

double source = 0.814/overallscale;
gslew[threshold10] = source;
source *= 1.618033988749894848204586;
gslew[threshold9] = source;
source *= 1.618033988749894848204586;
gslew[threshold8] = source;
source *= 1.618033988749894848204586;
gslew[threshold7] = source;
source *= 1.618033988749894848204586;
gslew[threshold6] = source;
source *= 1.618033988749894848204586;
gslew[threshold5] = source;
source *= 1.618033988749894848204586;
gslew[threshold4] = source;
source *= 1.618033988749894848204586;
gslew[threshold3] = source;
source *= 1.618033988749894848204586;
gslew[threshold2] = source;
source *= 1.618033988749894848204586;
gslew[threshold1] = source;
source *= 1.618033988749894848204586;


gainA = gainB;
gainB = sqrt(A); //smoothed master fader from Z2 filters
//this will be applied three times: this is to make the various tone alterations
//hit differently at different master fader drive levels.
//in particular, backing off the master fader tightens the super lows
//but opens up the EverySlew, because more of the attentuation happens before
//but opens up the modified Sinew, because more of the attentuation happens before
//you even get to slew clipping :) and if the fader is not active, it bypasses completely.

double threshSinew = 0.5171104/overallscale;

while (--sampleFrames >= 0)
{
double inputSampleL = *in1;
Expand Down Expand Up @@ -121,23 +101,22 @@ void ConsoleMCBuss::processReplacing(float **inputs, float **outputs, VstInt32 s
//after C7Buss but before EverySlew: allow highs to come out a bit more
//when pulling back master fader. Less drive equals more open

//begin EverySlew
for (int x = 20; x < gslew_total; x += 5) { //gslew_total is 50

if (((inputSampleL-gslew[x])-((gslew[x]-gslew[x+2])*0.618033988749894848204586)) > gslew[x+4])
inputSampleL = (gslew[x]-((gslew[x]-gslew[x+2])*0.141)) + (gslew[x+4]*(1.0-0.141));
if (-((inputSampleL-gslew[x])-((gslew[x]-gslew[x+2])*0.618033988749894848204586)) > gslew[x+4])
inputSampleL = (gslew[x]-((gslew[x]-gslew[x+2])*0.141*0.78)) - (gslew[x+4]*(1.0-(0.141*0.78)));
gslew[x+2] = gslew[x]*(1.0-0.141);
gslew[x] = inputSampleL;

if (((inputSampleR-gslew[x+1])-((gslew[x+1]-gslew[x+3])*0.618033988749894848204586)) > gslew[x+4])
inputSampleR = (gslew[x+1]-((gslew[x+1]-gslew[x+3])*0.141)) + (gslew[x+4]*(1.0-0.141));
if (-((inputSampleR-gslew[x+1])-((gslew[x+1]-gslew[x+3])*0.618033988749894848204586)) > gslew[x+4])
inputSampleR = (gslew[x+1]-((gslew[x+1]-gslew[x+3])*0.141*0.78)) - (gslew[x+4]*(1.0-(0.141*0.78)));
gslew[x+3] = gslew[x+1]*(1.0-0.141);
gslew[x+1] = inputSampleR;
}
temp = inputSampleL;
double clamp = inputSampleL - lastSinewL;
if (lastSinewL > 1.0) lastSinewL = 1.0;
if (lastSinewL < -1.0) lastSinewL = -1.0;
double sinew = threshSinew * cos(lastSinewL);
if (clamp > sinew) temp = lastSinewL + sinew;
if (-clamp > sinew) temp = lastSinewL - sinew;
inputSampleL = lastSinewL = temp;
temp = inputSampleR;
clamp = inputSampleR - lastSinewR;
if (lastSinewR > 1.0) lastSinewR = 1.0;
if (lastSinewR < -1.0) lastSinewR = -1.0;
sinew = threshSinew * cos(lastSinewR);
if (clamp > sinew) temp = lastSinewR + sinew;
if (-clamp > sinew) temp = lastSinewR - sinew;
inputSampleR = lastSinewR = temp;

if (gain < 1.0) {
inputSampleL *= gain;
Expand Down Expand Up @@ -175,37 +154,17 @@ void ConsoleMCBuss::processDoubleReplacing(double **inputs, double **outputs, Vs
double overallscale = 1.0;
overallscale /= 44100.0;
overallscale *= getSampleRate();

double source = 0.814/overallscale;
gslew[threshold10] = source;
source *= 1.618033988749894848204586;
gslew[threshold9] = source;
source *= 1.618033988749894848204586;
gslew[threshold8] = source;
source *= 1.618033988749894848204586;
gslew[threshold7] = source;
source *= 1.618033988749894848204586;
gslew[threshold6] = source;
source *= 1.618033988749894848204586;
gslew[threshold5] = source;
source *= 1.618033988749894848204586;
gslew[threshold4] = source;
source *= 1.618033988749894848204586;
gslew[threshold3] = source;
source *= 1.618033988749894848204586;
gslew[threshold2] = source;
source *= 1.618033988749894848204586;
gslew[threshold1] = source;
source *= 1.618033988749894848204586;


gainA = gainB;
gainB = sqrt(A); //smoothed master fader from Z2 filters
//this will be applied three times: this is to make the various tone alterations
//hit differently at different master fader drive levels.
//in particular, backing off the master fader tightens the super lows
//but opens up the EverySlew, because more of the attentuation happens before
//but opens up the modified Sinew, because more of the attentuation happens before
//you even get to slew clipping :) and if the fader is not active, it bypasses completely.

double threshSinew = 0.5171104/overallscale;

while (--sampleFrames >= 0)
{
double inputSampleL = *in1;
Expand Down Expand Up @@ -277,23 +236,22 @@ void ConsoleMCBuss::processDoubleReplacing(double **inputs, double **outputs, Vs
//after C7Buss but before EverySlew: allow highs to come out a bit more
//when pulling back master fader. Less drive equals more open

//begin EverySlew
for (int x = 20; x < gslew_total; x += 5) { //gslew_total is 50

if (((inputSampleL-gslew[x])-((gslew[x]-gslew[x+2])*0.618033988749894848204586)) > gslew[x+4])
inputSampleL = (gslew[x]-((gslew[x]-gslew[x+2])*0.141)) + (gslew[x+4]*(1.0-0.141));
if (-((inputSampleL-gslew[x])-((gslew[x]-gslew[x+2])*0.618033988749894848204586)) > gslew[x+4])
inputSampleL = (gslew[x]-((gslew[x]-gslew[x+2])*0.141*0.78)) - (gslew[x+4]*(1.0-(0.141*0.78)));
gslew[x+2] = gslew[x]*(1.0-0.141);
gslew[x] = inputSampleL;

if (((inputSampleR-gslew[x+1])-((gslew[x+1]-gslew[x+3])*0.618033988749894848204586)) > gslew[x+4])
inputSampleR = (gslew[x+1]-((gslew[x+1]-gslew[x+3])*0.141)) + (gslew[x+4]*(1.0-0.141));
if (-((inputSampleR-gslew[x+1])-((gslew[x+1]-gslew[x+3])*0.618033988749894848204586)) > gslew[x+4])
inputSampleR = (gslew[x+1]-((gslew[x+1]-gslew[x+3])*0.141*0.78)) - (gslew[x+4]*(1.0-(0.141*0.78)));
gslew[x+3] = gslew[x+1]*(1.0-0.141);
gslew[x+1] = inputSampleR;
}
temp = inputSampleL;
double clamp = inputSampleL - lastSinewL;
if (lastSinewL > 1.0) lastSinewL = 1.0;
if (lastSinewL < -1.0) lastSinewL = -1.0;
double sinew = threshSinew * cos(lastSinewL);
if (clamp > sinew) temp = lastSinewL + sinew;
if (-clamp > sinew) temp = lastSinewL - sinew;
inputSampleL = lastSinewL = temp;
temp = inputSampleR;
clamp = inputSampleR - lastSinewR;
if (lastSinewR > 1.0) lastSinewR = 1.0;
if (lastSinewR < -1.0) lastSinewR = -1.0;
sinew = threshSinew * cos(lastSinewR);
if (clamp > sinew) temp = lastSinewR + sinew;
if (-clamp > sinew) temp = lastSinewR - sinew;
inputSampleR = lastSinewR = temp;

if (gain < 1.0) {
inputSampleL *= gain;
Expand Down

0 comments on commit 26c27c7

Please sign in to comment.