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 May 26, 2024
1 parent 3e07dda commit 6cb6951
Show file tree
Hide file tree
Showing 14 changed files with 1,885 additions and 217 deletions.
2 changes: 1 addition & 1 deletion libs/airwindows
Submodule airwindows updated 249 files
11 changes: 11 additions & 0 deletions res/awpdoc/CrunchCoat.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CrunchCoat is a cursed retro digital reverb!

Such was the reaction of my livestream as this one came to life. Cursed retro digital is such an evocative term, isn't it? Gives you an idea of what you're in store for.

This is no simple bitcrusher. What it's doing, is taking the existing ClearCoat reverb, a bright-ambiences reverb, into unknown territory through relentless abuse of undersampling. This is a first for me: rather than use undersampling to cleanly deliver appropriate reverb sounds whether at 2x or 4x sample rates, this time we're just running with that functionality and allowing you to crunch the sample rate down to about 40 hertz, if you like.

What happens to the waveform when you only get a 'sample' every now and then? In this case, the plugin interpolates so it's not all square-wavey. Good news and/or bad news: it's not doing a clever interpolation. It's basically drawing straight lines between the points. So, depending on what the reverb's doing, you can get fairly soft waves… or pointy spikey nastiness. This, combined with the primitive input not-filtering, means you get a LOT of color and texture, but not the texture it was when it started. Instead… well, 'cursed retro digital' sums it up. Also, you can wildly pitch-swoop the entire reverb and crank up the regeneration to infinite sustain (or cut it out completely, even more than ClearCoat), which I'm sure nobody is going to use for evil at all.

This will lead to great new things for all my reverbs going forward. But this specific reverb is for only certain people, and you know who you are. Have fun!


248 changes: 126 additions & 122 deletions src/ModuleAdd.h

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/autogen_airwin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ set(AIRWIN_SOURCES
src/autogen_airwin/CreatureProc.cpp
src/autogen_airwin/CrickBass.cpp
src/autogen_airwin/CrickBassProc.cpp
src/autogen_airwin/CrunchCoat.cpp
src/autogen_airwin/CrunchCoatProc.cpp
src/autogen_airwin/CrunchyGrooveWear.cpp
src/autogen_airwin/CrunchyGrooveWearProc.cpp
src/autogen_airwin/Crystal.cpp
Expand Down Expand Up @@ -739,6 +741,8 @@ set(AIRWIN_SOURCES
src/autogen_airwin/WeightProc.cpp
src/autogen_airwin/Wider.cpp
src/autogen_airwin/WiderProc.cpp
src/autogen_airwin/Wolfbot.cpp
src/autogen_airwin/WolfbotProc.cpp
src/autogen_airwin/XBandpass.cpp
src/autogen_airwin/XBandpassProc.cpp
src/autogen_airwin/XHighpass.cpp
Expand Down
68 changes: 38 additions & 30 deletions src/autogen_airwin/ConsoleXBussProc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
fireGainA = fireGainB; fireGainB = FIR *2.0;
stoneGainA = stoneGainB; stoneGainB = STO *2.0;
//simple three band to adjust
double kalmanRange = 1.0-pow(RNG,2);
double kalmanRange = 1.0-(pow(RNG,2)/overallscale);
//crossover frequency between mid/bass

double compFThresh = pow(FCT,4);
Expand Down Expand Up @@ -265,12 +265,16 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
double gainL = 1.57079633-gainR;
gainR = sin(gainR); gainL = sin(gainL);
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
if (gain > 1.0) gain *= gain;
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
if (gain > 1.0) gain *= gain; else gain = 1.0-pow(1.0-gain,2);
gain *= 1.527864045000421;
double airGain = (airGainA*temp)+(airGainB*(1.0-temp));
if (airGain > 1.0) airGain *= airGain; else airGain = 1.0-pow(1.0-airGain,2);
double fireGain = (fireGainA*temp)+(fireGainB*(1.0-temp));
if (fireGain > 1.0) fireGain *= fireGain; else fireGain = 1.0-pow(1.0-fireGain,2);
double firePad = fireGain; if (firePad > 1.0) firePad = 1.0;
double stoneGain = (stoneGainA*temp)+(stoneGainB*(1.0-temp));
if (stoneGain > 1.0) stoneGain *= stoneGain; else stoneGain = 1.0-pow(1.0-stoneGain,2);
double stonePad = stoneGain; if (stonePad > 1.0) stonePad = 1.0;
//set up smoothed gain controls

if (highpassEngage) { //distributed Highpass
Expand Down Expand Up @@ -503,7 +507,7 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
air[pvAL2] = air[pvAL1]; air[pvAL1] = (air[gainAL] * air[outAL]) + drySampleL;
double fireL = drySampleL - ((air[outAL]*0.5)+(drySampleL*(0.457-(0.017*overallscale))));
temp = (fireL + air[gndavgL])*0.5; air[gndavgL] = fireL; fireL = temp;
double airL = drySampleL-fireL;
double airL = (drySampleL-fireL)*airGain;
inputSampleL = fireL;
//end Air3L
//begin Air3R
Expand All @@ -520,7 +524,7 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
air[pvAR2] = air[pvAR1]; air[pvAR1] = (air[gainAR] * air[outAR]) + drySampleR;
double fireR = drySampleR - ((air[outAR]*0.5)+(drySampleR*(0.457-(0.017*overallscale))));
temp = (fireR + air[gndavgR])*0.5; air[gndavgR] = fireR; fireR = temp;
double airR = drySampleR-fireR;
double airR = (drySampleR-fireR)*airGain;
inputSampleR = fireR;
//end Air3R
//begin KalmanL
Expand Down Expand Up @@ -584,20 +588,20 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
fireCompL -= (fireCompL * compFAttack);
fireCompL += ((compFThresh / fabs(fireL))*compFAttack);
} else fireCompL = (fireCompL*(1.0-compFRelease))+compFRelease;
if (fireCompL < 0.0) fireCompL = 0.0;
if (fabs(fireR) > compFThresh) { //compression R
fireCompR -= (fireCompR * compFAttack);
fireCompR += ((compFThresh / fabs(fireR))*compFAttack);
} else fireCompR = (fireCompR*(1.0-compFRelease))+compFRelease;
if (fireCompR < 0.0) fireCompR = 0.0;
if (fireCompL > fireCompR) fireCompL -= (fireCompL * compFAttack);
if (fireCompR > fireCompL) fireCompR -= (fireCompR * compFAttack);
if (fabs(fireL) > gateFThresh) fireGate = gateFSustain;
else if (fabs(fireR) > gateFThresh) fireGate = gateFSustain;
else fireGate *= (1.0-gateFRelease);
if (fireGate < 0.0) fireGate = 0.0;
if (fireCompL < 1.0) fireL *= ((1.0-compFRatio)+(fireCompL*compFRatio));
if (fireCompR < 1.0) fireR *= ((1.0-compFRatio)+(fireCompR*compFRatio));
fireCompL = fmax(fmin(fireCompL,1.0),0.0);
fireCompR = fmax(fmin(fireCompR,1.0),0.0);
fireL *= (((1.0-compFRatio)*firePad)+(fireCompL*compFRatio*fireGain));
fireR *= (((1.0-compFRatio)*firePad)+(fireCompR*compFRatio*fireGain));
if (fireGate < M_PI_2) {
temp = ((1.0-gateFRatio)+(sin(fireGate)*gateFRatio));
airL *= temp;
Expand All @@ -614,20 +618,20 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
stoneCompL -= (stoneCompL * compSAttack);
stoneCompL += ((compSThresh / fabs(stoneL))*compSAttack);
} else stoneCompL = (stoneCompL*(1.0-compSRelease))+compSRelease;
if (stoneCompL < 0.0) stoneCompL = 0.0;
if (fabs(stoneR) > compSThresh) { //compression R
stoneCompR -= (stoneCompR * compSAttack);
stoneCompR += ((compSThresh / fabs(stoneR))*compSAttack);
} else stoneCompR = (stoneCompR*(1.0-compSRelease))+compSRelease;
if (stoneCompR < 0.0) stoneCompR = 0.0;
if (stoneCompL > stoneCompR) stoneCompL -= (stoneCompL * compSAttack);
if (stoneCompR > stoneCompL) stoneCompR -= (stoneCompR * compSAttack);
if (fabs(stoneL) > gateSThresh) stoneGate = gateSSustain;
else if (fabs(stoneR) > gateSThresh) stoneGate = gateSSustain;
else stoneGate *= (1.0-gateSRelease);
if (stoneGate < 0.0) stoneGate = 0.0;
if (stoneCompL < 1.0) stoneL *= ((1.0-compSRatio)+(stoneCompL*compSRatio));
if (stoneCompR < 1.0) stoneR *= ((1.0-compSRatio)+(stoneCompR*compSRatio));
stoneCompL = fmax(fmin(stoneCompL,1.0),0.0);
stoneCompR = fmax(fmin(stoneCompR,1.0),0.0);
stoneL *= (((1.0-compSRatio)*stonePad)+(stoneCompL*compSRatio*stoneGain));
stoneR *= (((1.0-compSRatio)*stonePad)+(stoneCompR*compSRatio*stoneGain));
if (stoneGate < M_PI_2) {
temp = ((1.0-gateSRatio)+(sin(stoneGate)*gateSRatio));
stoneL *= temp;
Expand All @@ -637,8 +641,8 @@ void ConsoleXBuss::processReplacing(float **inputs, float **outputs, VstInt32 sa
bass[biqs_outL] *= temp; //if Stone gating, gate lmid and bass
bass[biqs_outR] *= temp; //note that we aren't compressing these
}
inputSampleL = (stoneL*stoneGain) + (fireL*fireGain) + (airL*airGain);
inputSampleR = (stoneR*stoneGain) + (fireR*fireGain) + (airR*airGain);
inputSampleL = stoneL + fireL + airL;
inputSampleR = stoneR + fireR + airR;
//create Stonefire output

if (highpassEngage) { //distributed Highpass
Expand Down Expand Up @@ -836,7 +840,7 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
fireGainA = fireGainB; fireGainB = FIR *2.0;
stoneGainA = stoneGainB; stoneGainB = STO *2.0;
//simple three band to adjust
double kalmanRange = 1.0-pow(RNG,2);
double kalmanRange = 1.0-(pow(RNG,2)/overallscale);
//crossover frequency between mid/bass

double compFThresh = pow(FCT,4);
Expand Down Expand Up @@ -982,12 +986,16 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
double gainL = 1.57079633-gainR;
gainR = sin(gainR); gainL = sin(gainL);
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
if (gain > 1.0) gain *= gain;
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
if (gain > 1.0) gain *= gain; else gain = 1.0-pow(1.0-gain,2);
gain *= 1.527864045000421;
double airGain = (airGainA*temp)+(airGainB*(1.0-temp));
if (airGain > 1.0) airGain *= airGain; else airGain = 1.0-pow(1.0-airGain,2);
double fireGain = (fireGainA*temp)+(fireGainB*(1.0-temp));
if (fireGain > 1.0) fireGain *= fireGain; else fireGain = 1.0-pow(1.0-fireGain,2);
double firePad = fireGain; if (firePad > 1.0) firePad = 1.0;
double stoneGain = (stoneGainA*temp)+(stoneGainB*(1.0-temp));
if (stoneGain > 1.0) stoneGain *= stoneGain; else stoneGain = 1.0-pow(1.0-stoneGain,2);
double stonePad = stoneGain; if (stonePad > 1.0) stonePad = 1.0;
//set up smoothed gain controls

if (highpassEngage) { //distributed Highpass
Expand Down Expand Up @@ -1220,7 +1228,7 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
air[pvAL2] = air[pvAL1]; air[pvAL1] = (air[gainAL] * air[outAL]) + drySampleL;
double fireL = drySampleL - ((air[outAL]*0.5)+(drySampleL*(0.457-(0.017*overallscale))));
temp = (fireL + air[gndavgL])*0.5; air[gndavgL] = fireL; fireL = temp;
double airL = drySampleL-fireL;
double airL = (drySampleL-fireL)*airGain;
inputSampleL = fireL;
//end Air3L
//begin Air3R
Expand All @@ -1237,7 +1245,7 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
air[pvAR2] = air[pvAR1]; air[pvAR1] = (air[gainAR] * air[outAR]) + drySampleR;
double fireR = drySampleR - ((air[outAR]*0.5)+(drySampleR*(0.457-(0.017*overallscale))));
temp = (fireR + air[gndavgR])*0.5; air[gndavgR] = fireR; fireR = temp;
double airR = drySampleR-fireR;
double airR = (drySampleR-fireR)*airGain;
inputSampleR = fireR;
//end Air3R
//begin KalmanL
Expand Down Expand Up @@ -1301,20 +1309,20 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
fireCompL -= (fireCompL * compFAttack);
fireCompL += ((compFThresh / fabs(fireL))*compFAttack);
} else fireCompL = (fireCompL*(1.0-compFRelease))+compFRelease;
if (fireCompL < 0.0) fireCompL = 0.0;
if (fabs(fireR) > compFThresh) { //compression R
fireCompR -= (fireCompR * compFAttack);
fireCompR += ((compFThresh / fabs(fireR))*compFAttack);
} else fireCompR = (fireCompR*(1.0-compFRelease))+compFRelease;
if (fireCompR < 0.0) fireCompR = 0.0;
if (fireCompL > fireCompR) fireCompL -= (fireCompL * compFAttack);
if (fireCompR > fireCompL) fireCompR -= (fireCompR * compFAttack);
if (fabs(fireL) > gateFThresh) fireGate = gateFSustain;
else if (fabs(fireR) > gateFThresh) fireGate = gateFSustain;
else fireGate *= (1.0-gateFRelease);
if (fireGate < 0.0) fireGate = 0.0;
if (fireCompL < 1.0) fireL *= ((1.0-compFRatio)+(fireCompL*compFRatio));
if (fireCompR < 1.0) fireR *= ((1.0-compFRatio)+(fireCompR*compFRatio));
fireCompL = fmax(fmin(fireCompL,1.0),0.0);
fireCompR = fmax(fmin(fireCompR,1.0),0.0);
fireL *= (((1.0-compFRatio)*firePad)+(fireCompL*compFRatio*fireGain));
fireR *= (((1.0-compFRatio)*firePad)+(fireCompR*compFRatio*fireGain));
if (fireGate < M_PI_2) {
temp = ((1.0-gateFRatio)+(sin(fireGate)*gateFRatio));
airL *= temp;
Expand All @@ -1331,20 +1339,20 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
stoneCompL -= (stoneCompL * compSAttack);
stoneCompL += ((compSThresh / fabs(stoneL))*compSAttack);
} else stoneCompL = (stoneCompL*(1.0-compSRelease))+compSRelease;
if (stoneCompL < 0.0) stoneCompL = 0.0;
if (fabs(stoneR) > compSThresh) { //compression R
stoneCompR -= (stoneCompR * compSAttack);
stoneCompR += ((compSThresh / fabs(stoneR))*compSAttack);
} else stoneCompR = (stoneCompR*(1.0-compSRelease))+compSRelease;
if (stoneCompR < 0.0) stoneCompR = 0.0;
if (stoneCompL > stoneCompR) stoneCompL -= (stoneCompL * compSAttack);
if (stoneCompR > stoneCompL) stoneCompR -= (stoneCompR * compSAttack);
if (fabs(stoneL) > gateSThresh) stoneGate = gateSSustain;
else if (fabs(stoneR) > gateSThresh) stoneGate = gateSSustain;
else stoneGate *= (1.0-gateSRelease);
if (stoneGate < 0.0) stoneGate = 0.0;
if (stoneCompL < 1.0) stoneL *= ((1.0-compSRatio)+(stoneCompL*compSRatio));
if (stoneCompR < 1.0) stoneR *= ((1.0-compSRatio)+(stoneCompR*compSRatio));
stoneCompL = fmax(fmin(stoneCompL,1.0),0.0);
stoneCompR = fmax(fmin(stoneCompR,1.0),0.0);
stoneL *= (((1.0-compSRatio)*stonePad)+(stoneCompL*compSRatio*stoneGain));
stoneR *= (((1.0-compSRatio)*stonePad)+(stoneCompR*compSRatio*stoneGain));
if (stoneGate < M_PI_2) {
temp = ((1.0-gateSRatio)+(sin(stoneGate)*gateSRatio));
stoneL *= temp;
Expand All @@ -1354,8 +1362,8 @@ void ConsoleXBuss::processDoubleReplacing(double **inputs, double **outputs, Vst
bass[biqs_outL] *= temp; //if Stone gating, gate lmid and bass
bass[biqs_outR] *= temp; //note that we aren't compressing these
}
inputSampleL = (stoneL*stoneGain) + (fireL*fireGain) + (airL*airGain);
inputSampleR = (stoneR*stoneGain) + (fireR*fireGain) + (airR*airGain);
inputSampleL = stoneL + fireL + airL;
inputSampleR = stoneR + fireR + airR;
//create Stonefire output

if (highpassEngage) { //distributed Highpass
Expand Down
Loading

0 comments on commit 6cb6951

Please sign in to comment.