mirror of
https://github.com/airwindows/airwindows.git
synced 2026-05-21 06:46:21 -06:00
CrunchCoat
This commit is contained in:
parent
3910224be8
commit
96820d2240
249 changed files with 48768 additions and 4018 deletions
Binary file not shown.
|
|
@ -118,7 +118,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);
|
||||
|
|
@ -264,12 +264,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
|
||||
|
|
@ -502,7 +506,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
|
||||
|
|
@ -519,7 +523,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
|
||||
|
|
@ -583,20 +587,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;
|
||||
|
|
@ -613,20 +617,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;
|
||||
|
|
@ -636,8 +640,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
|
||||
|
|
@ -835,7 +839,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);
|
||||
|
|
@ -981,12 +985,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
|
||||
|
|
@ -1219,7 +1227,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
|
||||
|
|
@ -1236,7 +1244,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
|
||||
|
|
@ -1300,20 +1308,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;
|
||||
|
|
@ -1330,20 +1338,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;
|
||||
|
|
@ -1353,8 +1361,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
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -63,7 +63,7 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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);
|
||||
|
|
@ -388,12 +388,16 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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 *= 0.763932022500211;
|
||||
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
|
||||
|
||||
//begin Air3L
|
||||
|
|
@ -410,7 +414,7 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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
|
||||
|
|
@ -427,7 +431,7 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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
|
||||
|
|
@ -491,20 +495,20 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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;
|
||||
|
|
@ -521,20 +525,20 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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;
|
||||
|
|
@ -544,8 +548,8 @@ void ConsoleXChannel::processReplacing(float **inputs, float **outputs, VstInt32
|
|||
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
|
||||
|
|
@ -701,7 +705,7 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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);
|
||||
|
|
@ -1026,12 +1030,16 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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 *= 0.763932022500211;
|
||||
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
|
||||
|
||||
//begin Air3L
|
||||
|
|
@ -1048,7 +1056,7 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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
|
||||
|
|
@ -1065,7 +1073,7 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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
|
||||
|
|
@ -1129,20 +1137,20 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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;
|
||||
|
|
@ -1159,20 +1167,20 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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;
|
||||
|
|
@ -1182,8 +1190,8 @@ void ConsoleXChannel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
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
|
||||
|
|
|
|||
BIN
plugins/WinVST/CrunchCoat/.vs/Console4Channel64/v14/.suo
Executable file
BIN
plugins/WinVST/CrunchCoat/.vs/Console4Channel64/v14/.suo
Executable file
Binary file not shown.
BIN
plugins/WinVST/CrunchCoat/.vs/VSTProject/v14/.suo
Executable file
BIN
plugins/WinVST/CrunchCoat/.vs/VSTProject/v14/.suo
Executable file
Binary file not shown.
244
plugins/WinVST/CrunchCoat/CrunchCoat.cpp
Executable file
244
plugins/WinVST/CrunchCoat/CrunchCoat.cpp
Executable file
|
|
@ -0,0 +1,244 @@
|
|||
/* ========================================
|
||||
* CrunchCoat - CrunchCoat.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __CrunchCoat_H
|
||||
#include "CrunchCoat.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new CrunchCoat(audioMaster);}
|
||||
|
||||
CrunchCoat::CrunchCoat(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.0;
|
||||
C = 1.0;
|
||||
D = 1.0;
|
||||
|
||||
for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;}
|
||||
for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;}
|
||||
|
||||
feedbackAL = 0.0;
|
||||
feedbackBL = 0.0;
|
||||
feedbackCL = 0.0;
|
||||
feedbackDL = 0.0;
|
||||
|
||||
previousAL = 0.0;
|
||||
previousBL = 0.0;
|
||||
previousCL = 0.0;
|
||||
previousDL = 0.0;
|
||||
previousEL = 0.0;
|
||||
|
||||
feedbackDR = 0.0;
|
||||
feedbackHR = 0.0;
|
||||
feedbackLR = 0.0;
|
||||
feedbackPR = 0.0;
|
||||
|
||||
previousAR = 0.0;
|
||||
previousBR = 0.0;
|
||||
previousCR = 0.0;
|
||||
previousDR = 0.0;
|
||||
previousER = 0.0;
|
||||
|
||||
lastRefL = 0.0;
|
||||
lastRefR = 0.0;
|
||||
lastTwoL = 0.0;
|
||||
lastTwoR = 0.0;
|
||||
lastStepL = 0.0;
|
||||
lastStepR = 0.0;
|
||||
lastVerb = 0.001;
|
||||
cycle = 1.0;
|
||||
|
||||
countAL = 1;
|
||||
countBL = 1;
|
||||
countCL = 1;
|
||||
countDL = 1;
|
||||
countEL = 1;
|
||||
countFL = 1;
|
||||
countGL = 1;
|
||||
countHL = 1;
|
||||
countIL = 1;
|
||||
countJL = 1;
|
||||
countKL = 1;
|
||||
countLL = 1;
|
||||
countML = 1;
|
||||
countNL = 1;
|
||||
countOL = 1;
|
||||
countPL = 1;
|
||||
|
||||
countAR = 1;
|
||||
countBR = 1;
|
||||
countCR = 1;
|
||||
countDR = 1;
|
||||
countER = 1;
|
||||
countFR = 1;
|
||||
countGR = 1;
|
||||
countHR = 1;
|
||||
countIR = 1;
|
||||
countJR = 1;
|
||||
countKR = 1;
|
||||
countLR = 1;
|
||||
countMR = 1;
|
||||
countNR = 1;
|
||||
countOR = 1;
|
||||
countPR = 1;
|
||||
|
||||
shortA = 336;
|
||||
shortB = 1660;
|
||||
shortC = 386;
|
||||
shortD = 623;
|
||||
shortE = 693;
|
||||
shortF = 1079;
|
||||
shortG = 891;
|
||||
shortH = 1574;
|
||||
shortI = 24;
|
||||
shortJ = 2641;
|
||||
shortK = 1239;
|
||||
shortL = 775;
|
||||
shortM = 11;
|
||||
shortN = 3104;
|
||||
shortO = 55;
|
||||
shortP = 2366;
|
||||
prevclearcoat = -1;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
|
||||
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
|
||||
_canDo.insert("x2in2out");
|
||||
setNumInputs(kNumInputs);
|
||||
setNumOutputs(kNumOutputs);
|
||||
setUniqueID(kUniqueId);
|
||||
canProcessReplacing(); // supports output replacing
|
||||
canDoubleReplacing(); // supports double precision processing
|
||||
programsAreChunks(true);
|
||||
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
|
||||
}
|
||||
|
||||
CrunchCoat::~CrunchCoat() {}
|
||||
VstInt32 CrunchCoat::getVendorVersion () {return 1000;}
|
||||
void CrunchCoat::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void CrunchCoat::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);}
|
||||
//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than
|
||||
//trying to do versioning and preventing people from using older versions. Maybe they like the old one!
|
||||
|
||||
static float pinParameter(float data)
|
||||
{
|
||||
if (data < 0.0f) return 0.0f;
|
||||
if (data > 1.0f) return 1.0f;
|
||||
return data;
|
||||
}
|
||||
|
||||
VstInt32 CrunchCoat::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 CrunchCoat::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CrunchCoat::setParameter(VstInt32 index, float value) {
|
||||
switch (index) {
|
||||
case kParamA: A = value; break;
|
||||
case kParamB: B = value; break;
|
||||
case kParamC: C = value; break;
|
||||
case kParamD: D = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float CrunchCoat::getParameter(VstInt32 index) {
|
||||
switch (index) {
|
||||
case kParamA: return A; break;
|
||||
case kParamB: return B; break;
|
||||
case kParamC: return C; break;
|
||||
case kParamD: return D; break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
||||
void CrunchCoat::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "Select", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "Regen", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "DeRez", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void CrunchCoat::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: int2string ((VstInt32)( A * 16.999 ), text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void CrunchCoat::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 CrunchCoat::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool CrunchCoat::getEffectName(char* name) {
|
||||
vst_strncpy(name, "CrunchCoat", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory CrunchCoat::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool CrunchCoat::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows CrunchCoat", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool CrunchCoat::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
204
plugins/WinVST/CrunchCoat/CrunchCoat.h
Executable file
204
plugins/WinVST/CrunchCoat/CrunchCoat.h
Executable file
|
|
@ -0,0 +1,204 @@
|
|||
/* ========================================
|
||||
* CrunchCoat - CrunchCoat.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) Airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __CrunchCoat_H
|
||||
#define __CrunchCoat_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA = 0,
|
||||
kParamB = 1,
|
||||
kParamC = 2,
|
||||
kParamD = 3,
|
||||
kNumParameters = 4
|
||||
}; //
|
||||
|
||||
const int kshortA = 350;
|
||||
const int kshortB = 1710;
|
||||
const int kshortC = 1610;
|
||||
const int kshortD = 835;
|
||||
const int kshortE = 700;
|
||||
const int kshortF = 1260;
|
||||
const int kshortG = 1110;
|
||||
const int kshortH = 1768;
|
||||
const int kshortI = 280;
|
||||
const int kshortJ = 2645;
|
||||
const int kshortK = 1410;
|
||||
const int kshortL = 1175;
|
||||
const int kshortM = 12;
|
||||
const int kshortN = 3110;
|
||||
const int kshortO = 120;
|
||||
const int kshortP = 2370;
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'crco'; //Change this to what the AU identity is!
|
||||
|
||||
class CrunchCoat :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
CrunchCoat(audioMasterCallback audioMaster);
|
||||
~CrunchCoat();
|
||||
virtual bool getEffectName(char* name); // The plug-in name
|
||||
virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in
|
||||
virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg
|
||||
virtual bool getVendorString(char* text); // Vendor info
|
||||
virtual VstInt32 getVendorVersion(); // Version number
|
||||
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
|
||||
virtual void getProgramName(char *name); // read the name from the host
|
||||
virtual void setProgramName(char *name); // changes the name of the preset displayed in the host
|
||||
virtual VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
virtual float getParameter(VstInt32 index); // get the parameter value at the specified index
|
||||
virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value
|
||||
virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB)
|
||||
virtual void getParameterName(VstInt32 index, char *text); // name of the parameter
|
||||
virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
//default stuff
|
||||
|
||||
double aAL[kshortA+5];
|
||||
double aBL[kshortB+5];
|
||||
double aCL[kshortC+5];
|
||||
double aDL[kshortD+5];
|
||||
double aEL[kshortE+5];
|
||||
double aFL[kshortF+5];
|
||||
double aGL[kshortG+5];
|
||||
double aHL[kshortH+5];
|
||||
double aIL[kshortI+5];
|
||||
double aJL[kshortJ+5];
|
||||
double aKL[kshortK+5];
|
||||
double aLL[kshortL+5];
|
||||
double aML[kshortM+5];
|
||||
double aNL[kshortN+5];
|
||||
double aOL[kshortO+5];
|
||||
double aPL[kshortP+5];
|
||||
|
||||
double aAR[kshortA+5];
|
||||
double aBR[kshortB+5];
|
||||
double aCR[kshortC+5];
|
||||
double aDR[kshortD+5];
|
||||
double aER[kshortE+5];
|
||||
double aFR[kshortF+5];
|
||||
double aGR[kshortG+5];
|
||||
double aHR[kshortH+5];
|
||||
double aIR[kshortI+5];
|
||||
double aJR[kshortJ+5];
|
||||
double aKR[kshortK+5];
|
||||
double aLR[kshortL+5];
|
||||
double aMR[kshortM+5];
|
||||
double aNR[kshortN+5];
|
||||
double aOR[kshortO+5];
|
||||
double aPR[kshortP+5];
|
||||
|
||||
double feedbackAL;
|
||||
double feedbackBL;
|
||||
double feedbackCL;
|
||||
double feedbackDL;
|
||||
|
||||
double feedbackDR;
|
||||
double feedbackHR;
|
||||
double feedbackLR;
|
||||
double feedbackPR;
|
||||
|
||||
double previousAL;
|
||||
double previousBL;
|
||||
double previousCL;
|
||||
double previousDL;
|
||||
double previousEL;
|
||||
|
||||
double previousAR;
|
||||
double previousBR;
|
||||
double previousCR;
|
||||
double previousDR;
|
||||
double previousER;
|
||||
|
||||
double lastRefL;
|
||||
double lastRefR;
|
||||
double lastTwoL;
|
||||
double lastTwoR;
|
||||
double lastStepL;
|
||||
double lastStepR;
|
||||
double lastVerb;
|
||||
double cycle;
|
||||
|
||||
|
||||
int countAL;
|
||||
int countBL;
|
||||
int countCL;
|
||||
int countDL;
|
||||
int countEL;
|
||||
int countFL;
|
||||
int countGL;
|
||||
int countHL;
|
||||
int countIL;
|
||||
int countJL;
|
||||
int countKL;
|
||||
int countLL;
|
||||
int countML;
|
||||
int countNL;
|
||||
int countOL;
|
||||
int countPL;
|
||||
|
||||
int countAR;
|
||||
int countBR;
|
||||
int countCR;
|
||||
int countDR;
|
||||
int countER;
|
||||
int countFR;
|
||||
int countGR;
|
||||
int countHR;
|
||||
int countIR;
|
||||
int countJR;
|
||||
int countKR;
|
||||
int countLR;
|
||||
int countMR;
|
||||
int countNR;
|
||||
int countOR;
|
||||
int countPR;
|
||||
|
||||
int shortA;
|
||||
int shortB;
|
||||
int shortC;
|
||||
int shortD;
|
||||
int shortE;
|
||||
int shortF;
|
||||
int shortG;
|
||||
int shortH;
|
||||
int shortI;
|
||||
int shortJ;
|
||||
int shortK;
|
||||
int shortL;
|
||||
int shortM;
|
||||
int shortN;
|
||||
int shortO;
|
||||
int shortP;
|
||||
|
||||
int prevclearcoat;
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
};
|
||||
|
||||
#endif
|
||||
666
plugins/WinVST/CrunchCoat/CrunchCoatProc.cpp
Executable file
666
plugins/WinVST/CrunchCoat/CrunchCoatProc.cpp
Executable file
|
|
@ -0,0 +1,666 @@
|
|||
/* ========================================
|
||||
* CrunchCoat - CrunchCoat.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __CrunchCoat_H
|
||||
#include "CrunchCoat.h"
|
||||
#endif
|
||||
|
||||
void CrunchCoat::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
float* in1 = inputs[0];
|
||||
float* in2 = inputs[1];
|
||||
float* out1 = outputs[0];
|
||||
float* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
int clearcoat = (int)(A*16.999);
|
||||
if (clearcoat != prevclearcoat) {
|
||||
for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;}
|
||||
for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;}
|
||||
countAL = 1;
|
||||
countBL = 1;
|
||||
countCL = 1;
|
||||
countDL = 1;
|
||||
countEL = 1;
|
||||
countFL = 1;
|
||||
countGL = 1;
|
||||
countHL = 1;
|
||||
countIL = 1;
|
||||
countJL = 1;
|
||||
countKL = 1;
|
||||
countLL = 1;
|
||||
countML = 1;
|
||||
countNL = 1;
|
||||
countOL = 1;
|
||||
countPL = 1;
|
||||
|
||||
countAR = 1;
|
||||
countBR = 1;
|
||||
countCR = 1;
|
||||
countDR = 1;
|
||||
countER = 1;
|
||||
countFR = 1;
|
||||
countGR = 1;
|
||||
countHR = 1;
|
||||
countIR = 1;
|
||||
countJR = 1;
|
||||
countKR = 1;
|
||||
countLR = 1;
|
||||
countMR = 1;
|
||||
countNR = 1;
|
||||
countOR = 1;
|
||||
countPR = 1;
|
||||
switch (clearcoat)
|
||||
{
|
||||
case 0:
|
||||
shortA = 65; shortB = 124; shortC = 83; shortD = 180; shortE = 200; shortF = 291; shortG = 108; shortH = 189; shortI = 73; shortJ = 410; shortK = 479; shortL = 310; shortM = 11; shortN = 928; shortO = 23; shortP = 654; break; //5 to 51 ms, 96 seat room. Scarcity, 1 in 125324
|
||||
//Short96
|
||||
case 1:
|
||||
shortA = 114; shortB = 205; shortC = 498; shortD = 195; shortE = 205; shortF = 318; shortG = 143; shortH = 254; shortI = 64; shortJ = 721; shortK = 512; shortL = 324; shortM = 11; shortN = 782; shortO = 26; shortP = 394; break; //7 to 52 ms, 107 seat club. Scarcity, 1 in 65537
|
||||
//Short107
|
||||
case 2:
|
||||
shortA = 118; shortB = 272; shortC = 292; shortD = 145; shortE = 200; shortF = 241; shortG = 204; shortH = 504; shortI = 50; shortJ = 678; shortK = 424; shortL = 412; shortM = 11; shortN = 1124; shortO = 47; shortP = 766; break; //8 to 58 ms, 135 seat club. Scarcity, 1 in 196272
|
||||
//Short135
|
||||
case 3:
|
||||
shortA = 19; shortB = 474; shortC = 301; shortD = 275; shortE = 260; shortF = 321; shortG = 371; shortH = 571; shortI = 50; shortJ = 410; shortK = 697; shortL = 414; shortM = 11; shortN = 986; shortO = 47; shortP = 522; break; //7 to 61 ms, 143 seat club. Scarcity, 1 in 165738
|
||||
//Short143
|
||||
case 4:
|
||||
shortA = 112; shortB = 387; shortC = 452; shortD = 289; shortE = 173; shortF = 476; shortG = 321; shortH = 593; shortI = 73; shortJ = 343; shortK = 829; shortL = 91; shortM = 11; shortN = 1055; shortO = 43; shortP = 862; break; //8 to 66 ms, 166 seat club. Scarcity, 1 in 158437
|
||||
//Short166
|
||||
case 5:
|
||||
shortA = 60; shortB = 368; shortC = 295; shortD = 272; shortE = 210; shortF = 284; shortG = 326; shortH = 830; shortI = 125; shortJ = 236; shortK = 737; shortL = 486; shortM = 11; shortN = 1178; shortO = 75; shortP = 902; break; //9 to 70 ms, 189 seat club. Scarcity, 1 in 94790
|
||||
//Short189
|
||||
case 6:
|
||||
shortA = 73; shortB = 311; shortC = 472; shortD = 251; shortE = 134; shortF = 509; shortG = 393; shortH = 591; shortI = 124; shortJ = 1070; shortK = 340; shortL = 525; shortM = 11; shortN = 1367; shortO = 75; shortP = 816; break; //7 to 79 ms, 225 seat club. Scarcity, 1 in 257803
|
||||
//Short225
|
||||
case 7:
|
||||
shortA = 159; shortB = 518; shortC = 514; shortD = 165; shortE = 275; shortF = 494; shortG = 296; shortH = 667; shortI = 75; shortJ = 1101; shortK = 116; shortL = 414; shortM = 11; shortN = 1261; shortO = 79; shortP = 998; break; //11 to 80 ms, 252 seat club. Scarcity, 1 in 175192
|
||||
//Short252
|
||||
case 8:
|
||||
shortA = 41; shortB = 741; shortC = 274; shortD = 59; shortE = 306; shortF = 332; shortG = 291; shortH = 767; shortI = 42; shortJ = 881; shortK = 959; shortL = 422; shortM = 11; shortN = 1237; shortO = 45; shortP = 958; break; //8 to 83 ms, 255 seat club. Scarcity, 1 in 185708
|
||||
//Short255
|
||||
case 9:
|
||||
shortA = 251; shortB = 437; shortC = 783; shortD = 189; shortE = 130; shortF = 272; shortG = 244; shortH = 761; shortI = 128; shortJ = 1190; shortK = 320; shortL = 491; shortM = 11; shortN = 1409; shortO = 58; shortP = 455; break; //10 to 93 ms, 323 seat club. Scarcity, 1 in 334044
|
||||
//Short323
|
||||
case 10:
|
||||
shortA = 316; shortB = 510; shortC = 1087; shortD = 349; shortE = 359; shortF = 74; shortG = 79; shortH = 1269; shortI = 34; shortJ = 693; shortK = 749; shortL = 511; shortM = 11; shortN = 1751; shortO = 93; shortP = 403; break; //9 to 110 ms, 427 seat theater. Scarcity, 1 in 200715
|
||||
//Short427
|
||||
case 11:
|
||||
shortA = 254; shortB = 651; shortC = 845; shortD = 316; shortE = 373; shortF = 267; shortG = 182; shortH = 857; shortI = 215; shortJ = 1535; shortK = 1127; shortL = 315; shortM = 11; shortN = 1649; shortO = 97; shortP = 829; break; //15 to 110 ms, 470 seat theater. Scarcity, 1 in 362673
|
||||
//Short470
|
||||
case 12:
|
||||
shortA = 113; shortB = 101; shortC = 673; shortD = 357; shortE = 340; shortF = 229; shortG = 278; shortH = 1008; shortI = 265; shortJ = 1890; shortK = 155; shortL = 267; shortM = 11; shortN = 2233; shortO = 116; shortP = 600; break; //11 to 131 ms, 606 seat theater. Scarcity, 1 in 238058
|
||||
//Short606
|
||||
case 13:
|
||||
shortA = 218; shortB = 1058; shortC = 862; shortD = 505; shortE = 297; shortF = 580; shortG = 532; shortH = 1387; shortI = 120; shortJ = 576; shortK = 1409; shortL = 473; shortM = 11; shortN = 1991; shortO = 76; shortP = 685; break; //14 to 132 ms, 643 seat theater. Scarcity, 1 in 193432
|
||||
//Short643
|
||||
case 14:
|
||||
shortA = 78; shortB = 760; shortC = 982; shortD = 528; shortE = 445; shortF = 1128; shortG = 130; shortH = 708; shortI = 22; shortJ = 2144; shortK = 354; shortL = 1169; shortM = 11; shortN = 2782; shortO = 58; shortP = 1515; break; //5 to 159 ms, 809 seat hall. Scarcity, 1 in 212274
|
||||
//Short809
|
||||
case 15:
|
||||
shortA = 330; shortB = 107; shortC = 1110; shortD = 371; shortE = 620; shortF = 143; shortG = 1014; shortH = 1763; shortI = 184; shortJ = 2068; shortK = 1406; shortL = 595; shortM = 11; shortN = 2639; shortO = 33; shortP = 1594; break; //10 to 171 ms, 984 seat hall. Scarcity, 1 in 226499
|
||||
//Short984
|
||||
case 16:
|
||||
default:
|
||||
shortA = 336; shortB = 1660; shortC = 386; shortD = 623; shortE = 693; shortF = 1079; shortG = 891; shortH = 1574; shortI = 24; shortJ = 2641; shortK = 1239; shortL = 775; shortM = 11; shortN = 3104; shortO = 55; shortP = 2366; break; //24 to 203 ms, 1541 seat hall. Scarcity, 1 in 275025
|
||||
//Short1541
|
||||
}
|
||||
prevclearcoat = clearcoat;
|
||||
}
|
||||
|
||||
double regen = (1.0-pow(1.0-B,2.0))*0.0625;
|
||||
double derez = pow(C*0.99,2.0)/overallscale;
|
||||
//adjustment made tp compensate for addition of lastverb
|
||||
double wet = D*2.0;
|
||||
double dry = 2.0 - wet;
|
||||
if (wet > 1.0) wet = 1.0;
|
||||
if (wet < 0.0) wet = 0.0;
|
||||
if (dry > 1.0) dry = 1.0;
|
||||
if (dry < 0.0) dry = 0.0;
|
||||
//this reverb makes 50% full dry AND full wet, not crossfaded.
|
||||
//that's so it can be on submixes without cutting back dry channel when adjusted:
|
||||
//unless you go super heavy, you are only adjusting the added verb loudness.
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
cycle += (derez+lastVerb);
|
||||
if (cycle > 1.0) { //hit the end point and we do a reverb sample
|
||||
cycle -= 1.0;
|
||||
aAL[countAL] = inputSampleL + (feedbackAL * regen);
|
||||
aBL[countBL] = inputSampleL + (feedbackBL * regen);
|
||||
aCL[countCL] = inputSampleL + (feedbackCL * regen);
|
||||
aDL[countDL] = inputSampleL + (feedbackDL * regen);
|
||||
|
||||
aDR[countDR] = inputSampleR + (feedbackDR * regen);
|
||||
aHR[countHR] = inputSampleR + (feedbackHR * regen);
|
||||
aLR[countLR] = inputSampleR + (feedbackLR * regen);
|
||||
aPR[countPR] = inputSampleR + (feedbackPR * regen);
|
||||
|
||||
countAL++; if (countAL < 0 || countAL > shortA) countAL = 0;
|
||||
countBL++; if (countBL < 0 || countBL > shortB) countBL = 0;
|
||||
countCL++; if (countCL < 0 || countCL > shortC) countCL = 0;
|
||||
countDL++; if (countDL < 0 || countDL > shortD) countDL = 0;
|
||||
|
||||
countDR++; if (countDR < 0 || countDR > shortD) countDR = 0;
|
||||
countHR++; if (countHR < 0 || countHR > shortH) countHR = 0;
|
||||
countLR++; if (countLR < 0 || countLR > shortL) countLR = 0;
|
||||
countPR++; if (countPR < 0 || countPR > shortP) countPR = 0;
|
||||
|
||||
double outAL = aAL[countAL-((countAL > shortA)?shortA+1:0)];
|
||||
double outBL = aBL[countBL-((countBL > shortB)?shortB+1:0)];
|
||||
double outCL = aCL[countCL-((countCL > shortC)?shortC+1:0)];
|
||||
double outDL = aDL[countDL-((countDL > shortD)?shortD+1:0)];
|
||||
|
||||
double outDR = aDR[countDR-((countDR > shortD)?shortD+1:0)];
|
||||
double outHR = aHR[countHR-((countHR > shortH)?shortH+1:0)];
|
||||
double outLR = aLR[countLR-((countLR > shortL)?shortL+1:0)];
|
||||
double outPR = aPR[countPR-((countPR > shortP)?shortP+1:0)];
|
||||
|
||||
aEL[countEL] = outAL - (outBL + outCL + outDL);
|
||||
aFL[countFL] = outBL - (outAL + outCL + outDL);
|
||||
aGL[countGL] = outCL - (outAL + outBL + outDL);
|
||||
aHL[countHL] = outDL - (outAL + outBL + outCL);
|
||||
|
||||
aCR[countCR] = outDR - (outHR + outLR + outPR);
|
||||
aGR[countGR] = outHR - (outDR + outLR + outPR);
|
||||
aKR[countKR] = outLR - (outDR + outHR + outPR);
|
||||
aOR[countOR] = outPR - (outDR + outHR + outLR);
|
||||
|
||||
countEL++; if (countEL < 0 || countEL > shortE) countEL = 0;
|
||||
countFL++; if (countFL < 0 || countFL > shortF) countFL = 0;
|
||||
countGL++; if (countGL < 0 || countGL > shortG) countGL = 0;
|
||||
countHL++; if (countHL < 0 || countHL > shortH) countHL = 0;
|
||||
|
||||
countCR++; if (countCR < 0 || countCR > shortC) countCR = 0;
|
||||
countGR++; if (countGR < 0 || countGR > shortG) countGR = 0;
|
||||
countKR++; if (countKR < 0 || countKR > shortK) countKR = 0;
|
||||
countOR++; if (countOR < 0 || countOR > shortO) countOR = 0;
|
||||
|
||||
double outEL = aEL[countEL-((countEL > shortE)?shortE+1:0)];
|
||||
double outFL = aFL[countFL-((countFL > shortF)?shortF+1:0)];
|
||||
double outGL = aGL[countGL-((countGL > shortG)?shortG+1:0)];
|
||||
double outHL = aHL[countHL-((countHL > shortH)?shortH+1:0)];
|
||||
|
||||
double outCR = aCR[countCR-((countCR > shortC)?shortC+1:0)];
|
||||
double outGR = aGR[countGR-((countGR > shortG)?shortG+1:0)];
|
||||
double outKR = aKR[countKR-((countKR > shortK)?shortK+1:0)];
|
||||
double outOR = aOR[countOR-((countOR > shortO)?shortO+1:0)];
|
||||
|
||||
aIL[countIL] = outEL - (outFL + outGL + outHL);
|
||||
aJL[countJL] = outFL - (outEL + outGL + outHL);
|
||||
aKL[countKL] = outGL - (outEL + outFL + outHL);
|
||||
aLL[countLL] = outHL - (outEL + outFL + outGL);
|
||||
|
||||
aBR[countBR] = outCR - (outGR + outKR + outOR);
|
||||
aFR[countFR] = outGR - (outCR + outKR + outOR);
|
||||
aJR[countJR] = outKR - (outCR + outGR + outOR);
|
||||
aNR[countNR] = outOR - (outCR + outGR + outKR);
|
||||
|
||||
countIL++; if (countIL < 0 || countIL > shortI) countIL = 0;
|
||||
countJL++; if (countJL < 0 || countJL > shortJ) countJL = 0;
|
||||
countKL++; if (countKL < 0 || countKL > shortK) countKL = 0;
|
||||
countLL++; if (countLL < 0 || countLL > shortL) countLL = 0;
|
||||
|
||||
countBR++; if (countBR < 0 || countBR > shortB) countBR = 0;
|
||||
countFR++; if (countFR < 0 || countFR > shortF) countFR = 0;
|
||||
countJR++; if (countJR < 0 || countJR > shortJ) countJR = 0;
|
||||
countNR++; if (countNR < 0 || countNR > shortN) countNR = 0;
|
||||
|
||||
double outIL = aIL[countIL-((countIL > shortI)?shortI+1:0)];
|
||||
double outJL = aJL[countJL-((countJL > shortJ)?shortJ+1:0)];
|
||||
double outKL = aKL[countKL-((countKL > shortK)?shortK+1:0)];
|
||||
double outLL = aLL[countLL-((countLL > shortL)?shortL+1:0)];
|
||||
|
||||
double outBR = aBR[countBR-((countBR > shortB)?shortB+1:0)];
|
||||
double outFR = aFR[countFR-((countFR > shortF)?shortF+1:0)];
|
||||
double outJR = aJR[countJR-((countJR > shortJ)?shortJ+1:0)];
|
||||
double outNR = aNR[countNR-((countNR > shortN)?shortN+1:0)];
|
||||
|
||||
aML[countML] = outIL - (outJL + outKL + outLL);
|
||||
aNL[countNL] = outJL - (outIL + outKL + outLL);
|
||||
aOL[countOL] = outKL - (outIL + outJL + outLL);
|
||||
aPL[countPL] = outLL - (outIL + outJL + outKL);
|
||||
|
||||
aAR[countAR] = outBR - (outFR + outJR + outNR);
|
||||
aER[countER] = outFR - (outBR + outJR + outNR);
|
||||
aIR[countIR] = outJR - (outBR + outFR + outNR);
|
||||
aMR[countMR] = outNR - (outBR + outFR + outJR);
|
||||
|
||||
countML++; if (countML < 0 || countML > shortM) countML = 0;
|
||||
countNL++; if (countNL < 0 || countNL > shortN) countNL = 0;
|
||||
countOL++; if (countOL < 0 || countOL > shortO) countOL = 0;
|
||||
countPL++; if (countPL < 0 || countPL > shortP) countPL = 0;
|
||||
|
||||
countAR++; if (countAR < 0 || countAR > shortA) countAR = 0;
|
||||
countER++; if (countER < 0 || countER > shortE) countER = 0;
|
||||
countIR++; if (countIR < 0 || countIR > shortI) countIR = 0;
|
||||
countMR++; if (countMR < 0 || countMR > shortM) countMR = 0;
|
||||
|
||||
double outML = aML[countML-((countML > shortM)?shortM+1:0)];
|
||||
double outNL = aNL[countNL-((countNL > shortN)?shortN+1:0)];
|
||||
double outOL = aOL[countOL-((countOL > shortO)?shortO+1:0)];
|
||||
double outPL = aPL[countPL-((countPL > shortP)?shortP+1:0)];
|
||||
|
||||
double outAR = aAR[countAR-((countAR > shortA)?shortA+1:0)];
|
||||
double outER = aER[countER-((countER > shortE)?shortE+1:0)];
|
||||
double outIR = aIR[countIR-((countIR > shortI)?shortI+1:0)];
|
||||
double outMR = aMR[countMR-((countMR > shortM)?shortM+1:0)];
|
||||
|
||||
feedbackAL = outML - (outNL + outOL + outPL);
|
||||
feedbackDR = outAR - (outER + outIR + outMR);
|
||||
feedbackBL = outNL - (outML + outOL + outPL);
|
||||
feedbackHR = outER - (outAR + outIR + outMR);
|
||||
feedbackCL = outOL - (outML + outNL + outPL);
|
||||
feedbackLR = outIR - (outAR + outER + outMR);
|
||||
feedbackDL = outPL - (outML + outNL + outOL);
|
||||
feedbackPR = outMR - (outAR + outER + outIR);
|
||||
//which we need to feed back into the input again, a bit
|
||||
|
||||
inputSampleL = (outML + outNL + outOL + outPL)/16.0;
|
||||
inputSampleR = (outAR + outER + outIR + outMR)/16.0;
|
||||
//and take the final combined sum of outputs, corrected for Householder gain
|
||||
lastTwoL = lastRefL;
|
||||
lastRefL = inputSampleL;
|
||||
lastStepL = lastTwoL - lastRefL;
|
||||
inputSampleL = lastTwoL;
|
||||
lastTwoR = lastRefR;
|
||||
lastRefR = inputSampleR;
|
||||
lastStepR = lastTwoR - lastRefR;
|
||||
inputSampleR = lastTwoR;
|
||||
} else {
|
||||
inputSampleL = lastTwoL - (lastStepL*cycle);
|
||||
inputSampleR = lastTwoR - (lastStepR*cycle);
|
||||
}
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
lastVerb = (inputSampleL+inputSampleR)*(derez*0.029);
|
||||
//discontinuity applied to downsample rate. Increasing this adds grunge,
|
||||
//reducing it falls back to a colder sound. It has to be a factor of derez
|
||||
//in order to work at both low and high derezzes.
|
||||
if (derez == 0.0) {
|
||||
inputSampleL = 0.0;
|
||||
inputSampleR = 0.0;
|
||||
}
|
||||
|
||||
if (wet < 1.0) {inputSampleL *= wet; inputSampleR *= wet;}
|
||||
if (dry < 1.0) {drySampleL *= dry; drySampleR *= dry;}
|
||||
inputSampleL += drySampleL; inputSampleR += drySampleR;
|
||||
//this is our submix verb dry/wet: 0.5 is BOTH at FULL VOLUME
|
||||
//purpose is that, if you're adding verb, you're not altering other balances
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
|
||||
void CrunchCoat::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
double* out1 = outputs[0];
|
||||
double* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
int clearcoat = (int)(A*16.999);
|
||||
if (clearcoat != prevclearcoat) {
|
||||
for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;}
|
||||
for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;}
|
||||
for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;}
|
||||
countAL = 1;
|
||||
countBL = 1;
|
||||
countCL = 1;
|
||||
countDL = 1;
|
||||
countEL = 1;
|
||||
countFL = 1;
|
||||
countGL = 1;
|
||||
countHL = 1;
|
||||
countIL = 1;
|
||||
countJL = 1;
|
||||
countKL = 1;
|
||||
countLL = 1;
|
||||
countML = 1;
|
||||
countNL = 1;
|
||||
countOL = 1;
|
||||
countPL = 1;
|
||||
|
||||
countAR = 1;
|
||||
countBR = 1;
|
||||
countCR = 1;
|
||||
countDR = 1;
|
||||
countER = 1;
|
||||
countFR = 1;
|
||||
countGR = 1;
|
||||
countHR = 1;
|
||||
countIR = 1;
|
||||
countJR = 1;
|
||||
countKR = 1;
|
||||
countLR = 1;
|
||||
countMR = 1;
|
||||
countNR = 1;
|
||||
countOR = 1;
|
||||
countPR = 1;
|
||||
switch (clearcoat)
|
||||
{
|
||||
case 0:
|
||||
shortA = 65; shortB = 124; shortC = 83; shortD = 180; shortE = 200; shortF = 291; shortG = 108; shortH = 189; shortI = 73; shortJ = 410; shortK = 479; shortL = 310; shortM = 11; shortN = 928; shortO = 23; shortP = 654; break; //5 to 51 ms, 96 seat room. Scarcity, 1 in 125324
|
||||
//Short96
|
||||
case 1:
|
||||
shortA = 114; shortB = 205; shortC = 498; shortD = 195; shortE = 205; shortF = 318; shortG = 143; shortH = 254; shortI = 64; shortJ = 721; shortK = 512; shortL = 324; shortM = 11; shortN = 782; shortO = 26; shortP = 394; break; //7 to 52 ms, 107 seat club. Scarcity, 1 in 65537
|
||||
//Short107
|
||||
case 2:
|
||||
shortA = 118; shortB = 272; shortC = 292; shortD = 145; shortE = 200; shortF = 241; shortG = 204; shortH = 504; shortI = 50; shortJ = 678; shortK = 424; shortL = 412; shortM = 11; shortN = 1124; shortO = 47; shortP = 766; break; //8 to 58 ms, 135 seat club. Scarcity, 1 in 196272
|
||||
//Short135
|
||||
case 3:
|
||||
shortA = 19; shortB = 474; shortC = 301; shortD = 275; shortE = 260; shortF = 321; shortG = 371; shortH = 571; shortI = 50; shortJ = 410; shortK = 697; shortL = 414; shortM = 11; shortN = 986; shortO = 47; shortP = 522; break; //7 to 61 ms, 143 seat club. Scarcity, 1 in 165738
|
||||
//Short143
|
||||
case 4:
|
||||
shortA = 112; shortB = 387; shortC = 452; shortD = 289; shortE = 173; shortF = 476; shortG = 321; shortH = 593; shortI = 73; shortJ = 343; shortK = 829; shortL = 91; shortM = 11; shortN = 1055; shortO = 43; shortP = 862; break; //8 to 66 ms, 166 seat club. Scarcity, 1 in 158437
|
||||
//Short166
|
||||
case 5:
|
||||
shortA = 60; shortB = 368; shortC = 295; shortD = 272; shortE = 210; shortF = 284; shortG = 326; shortH = 830; shortI = 125; shortJ = 236; shortK = 737; shortL = 486; shortM = 11; shortN = 1178; shortO = 75; shortP = 902; break; //9 to 70 ms, 189 seat club. Scarcity, 1 in 94790
|
||||
//Short189
|
||||
case 6:
|
||||
shortA = 73; shortB = 311; shortC = 472; shortD = 251; shortE = 134; shortF = 509; shortG = 393; shortH = 591; shortI = 124; shortJ = 1070; shortK = 340; shortL = 525; shortM = 11; shortN = 1367; shortO = 75; shortP = 816; break; //7 to 79 ms, 225 seat club. Scarcity, 1 in 257803
|
||||
//Short225
|
||||
case 7:
|
||||
shortA = 159; shortB = 518; shortC = 514; shortD = 165; shortE = 275; shortF = 494; shortG = 296; shortH = 667; shortI = 75; shortJ = 1101; shortK = 116; shortL = 414; shortM = 11; shortN = 1261; shortO = 79; shortP = 998; break; //11 to 80 ms, 252 seat club. Scarcity, 1 in 175192
|
||||
//Short252
|
||||
case 8:
|
||||
shortA = 41; shortB = 741; shortC = 274; shortD = 59; shortE = 306; shortF = 332; shortG = 291; shortH = 767; shortI = 42; shortJ = 881; shortK = 959; shortL = 422; shortM = 11; shortN = 1237; shortO = 45; shortP = 958; break; //8 to 83 ms, 255 seat club. Scarcity, 1 in 185708
|
||||
//Short255
|
||||
case 9:
|
||||
shortA = 251; shortB = 437; shortC = 783; shortD = 189; shortE = 130; shortF = 272; shortG = 244; shortH = 761; shortI = 128; shortJ = 1190; shortK = 320; shortL = 491; shortM = 11; shortN = 1409; shortO = 58; shortP = 455; break; //10 to 93 ms, 323 seat club. Scarcity, 1 in 334044
|
||||
//Short323
|
||||
case 10:
|
||||
shortA = 316; shortB = 510; shortC = 1087; shortD = 349; shortE = 359; shortF = 74; shortG = 79; shortH = 1269; shortI = 34; shortJ = 693; shortK = 749; shortL = 511; shortM = 11; shortN = 1751; shortO = 93; shortP = 403; break; //9 to 110 ms, 427 seat theater. Scarcity, 1 in 200715
|
||||
//Short427
|
||||
case 11:
|
||||
shortA = 254; shortB = 651; shortC = 845; shortD = 316; shortE = 373; shortF = 267; shortG = 182; shortH = 857; shortI = 215; shortJ = 1535; shortK = 1127; shortL = 315; shortM = 11; shortN = 1649; shortO = 97; shortP = 829; break; //15 to 110 ms, 470 seat theater. Scarcity, 1 in 362673
|
||||
//Short470
|
||||
case 12:
|
||||
shortA = 113; shortB = 101; shortC = 673; shortD = 357; shortE = 340; shortF = 229; shortG = 278; shortH = 1008; shortI = 265; shortJ = 1890; shortK = 155; shortL = 267; shortM = 11; shortN = 2233; shortO = 116; shortP = 600; break; //11 to 131 ms, 606 seat theater. Scarcity, 1 in 238058
|
||||
//Short606
|
||||
case 13:
|
||||
shortA = 218; shortB = 1058; shortC = 862; shortD = 505; shortE = 297; shortF = 580; shortG = 532; shortH = 1387; shortI = 120; shortJ = 576; shortK = 1409; shortL = 473; shortM = 11; shortN = 1991; shortO = 76; shortP = 685; break; //14 to 132 ms, 643 seat theater. Scarcity, 1 in 193432
|
||||
//Short643
|
||||
case 14:
|
||||
shortA = 78; shortB = 760; shortC = 982; shortD = 528; shortE = 445; shortF = 1128; shortG = 130; shortH = 708; shortI = 22; shortJ = 2144; shortK = 354; shortL = 1169; shortM = 11; shortN = 2782; shortO = 58; shortP = 1515; break; //5 to 159 ms, 809 seat hall. Scarcity, 1 in 212274
|
||||
//Short809
|
||||
case 15:
|
||||
shortA = 330; shortB = 107; shortC = 1110; shortD = 371; shortE = 620; shortF = 143; shortG = 1014; shortH = 1763; shortI = 184; shortJ = 2068; shortK = 1406; shortL = 595; shortM = 11; shortN = 2639; shortO = 33; shortP = 1594; break; //10 to 171 ms, 984 seat hall. Scarcity, 1 in 226499
|
||||
//Short984
|
||||
case 16:
|
||||
default:
|
||||
shortA = 336; shortB = 1660; shortC = 386; shortD = 623; shortE = 693; shortF = 1079; shortG = 891; shortH = 1574; shortI = 24; shortJ = 2641; shortK = 1239; shortL = 775; shortM = 11; shortN = 3104; shortO = 55; shortP = 2366; break; //24 to 203 ms, 1541 seat hall. Scarcity, 1 in 275025
|
||||
//Short1541
|
||||
}
|
||||
prevclearcoat = clearcoat;
|
||||
}
|
||||
|
||||
double regen = (1.0-pow(1.0-B,2.0))*0.0625;
|
||||
double derez = pow(C*0.99,2.0)/overallscale;
|
||||
//adjustment made tp compensate for addition of lastverb
|
||||
double wet = D*2.0;
|
||||
double dry = 2.0 - wet;
|
||||
if (wet > 1.0) wet = 1.0;
|
||||
if (wet < 0.0) wet = 0.0;
|
||||
if (dry > 1.0) dry = 1.0;
|
||||
if (dry < 0.0) dry = 0.0;
|
||||
//this reverb makes 50% full dry AND full wet, not crossfaded.
|
||||
//that's so it can be on submixes without cutting back dry channel when adjusted:
|
||||
//unless you go super heavy, you are only adjusting the added verb loudness.
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
cycle += (derez+lastVerb);
|
||||
if (cycle > 1.0) { //hit the end point and we do a reverb sample
|
||||
cycle -= 1.0;
|
||||
aAL[countAL] = inputSampleL + (feedbackAL * regen);
|
||||
aBL[countBL] = inputSampleL + (feedbackBL * regen);
|
||||
aCL[countCL] = inputSampleL + (feedbackCL * regen);
|
||||
aDL[countDL] = inputSampleL + (feedbackDL * regen);
|
||||
|
||||
aDR[countDR] = inputSampleR + (feedbackDR * regen);
|
||||
aHR[countHR] = inputSampleR + (feedbackHR * regen);
|
||||
aLR[countLR] = inputSampleR + (feedbackLR * regen);
|
||||
aPR[countPR] = inputSampleR + (feedbackPR * regen);
|
||||
|
||||
countAL++; if (countAL < 0 || countAL > shortA) countAL = 0;
|
||||
countBL++; if (countBL < 0 || countBL > shortB) countBL = 0;
|
||||
countCL++; if (countCL < 0 || countCL > shortC) countCL = 0;
|
||||
countDL++; if (countDL < 0 || countDL > shortD) countDL = 0;
|
||||
|
||||
countDR++; if (countDR < 0 || countDR > shortD) countDR = 0;
|
||||
countHR++; if (countHR < 0 || countHR > shortH) countHR = 0;
|
||||
countLR++; if (countLR < 0 || countLR > shortL) countLR = 0;
|
||||
countPR++; if (countPR < 0 || countPR > shortP) countPR = 0;
|
||||
|
||||
double outAL = aAL[countAL-((countAL > shortA)?shortA+1:0)];
|
||||
double outBL = aBL[countBL-((countBL > shortB)?shortB+1:0)];
|
||||
double outCL = aCL[countCL-((countCL > shortC)?shortC+1:0)];
|
||||
double outDL = aDL[countDL-((countDL > shortD)?shortD+1:0)];
|
||||
|
||||
double outDR = aDR[countDR-((countDR > shortD)?shortD+1:0)];
|
||||
double outHR = aHR[countHR-((countHR > shortH)?shortH+1:0)];
|
||||
double outLR = aLR[countLR-((countLR > shortL)?shortL+1:0)];
|
||||
double outPR = aPR[countPR-((countPR > shortP)?shortP+1:0)];
|
||||
|
||||
aEL[countEL] = outAL - (outBL + outCL + outDL);
|
||||
aFL[countFL] = outBL - (outAL + outCL + outDL);
|
||||
aGL[countGL] = outCL - (outAL + outBL + outDL);
|
||||
aHL[countHL] = outDL - (outAL + outBL + outCL);
|
||||
|
||||
aCR[countCR] = outDR - (outHR + outLR + outPR);
|
||||
aGR[countGR] = outHR - (outDR + outLR + outPR);
|
||||
aKR[countKR] = outLR - (outDR + outHR + outPR);
|
||||
aOR[countOR] = outPR - (outDR + outHR + outLR);
|
||||
|
||||
countEL++; if (countEL < 0 || countEL > shortE) countEL = 0;
|
||||
countFL++; if (countFL < 0 || countFL > shortF) countFL = 0;
|
||||
countGL++; if (countGL < 0 || countGL > shortG) countGL = 0;
|
||||
countHL++; if (countHL < 0 || countHL > shortH) countHL = 0;
|
||||
|
||||
countCR++; if (countCR < 0 || countCR > shortC) countCR = 0;
|
||||
countGR++; if (countGR < 0 || countGR > shortG) countGR = 0;
|
||||
countKR++; if (countKR < 0 || countKR > shortK) countKR = 0;
|
||||
countOR++; if (countOR < 0 || countOR > shortO) countOR = 0;
|
||||
|
||||
double outEL = aEL[countEL-((countEL > shortE)?shortE+1:0)];
|
||||
double outFL = aFL[countFL-((countFL > shortF)?shortF+1:0)];
|
||||
double outGL = aGL[countGL-((countGL > shortG)?shortG+1:0)];
|
||||
double outHL = aHL[countHL-((countHL > shortH)?shortH+1:0)];
|
||||
|
||||
double outCR = aCR[countCR-((countCR > shortC)?shortC+1:0)];
|
||||
double outGR = aGR[countGR-((countGR > shortG)?shortG+1:0)];
|
||||
double outKR = aKR[countKR-((countKR > shortK)?shortK+1:0)];
|
||||
double outOR = aOR[countOR-((countOR > shortO)?shortO+1:0)];
|
||||
|
||||
aIL[countIL] = outEL - (outFL + outGL + outHL);
|
||||
aJL[countJL] = outFL - (outEL + outGL + outHL);
|
||||
aKL[countKL] = outGL - (outEL + outFL + outHL);
|
||||
aLL[countLL] = outHL - (outEL + outFL + outGL);
|
||||
|
||||
aBR[countBR] = outCR - (outGR + outKR + outOR);
|
||||
aFR[countFR] = outGR - (outCR + outKR + outOR);
|
||||
aJR[countJR] = outKR - (outCR + outGR + outOR);
|
||||
aNR[countNR] = outOR - (outCR + outGR + outKR);
|
||||
|
||||
countIL++; if (countIL < 0 || countIL > shortI) countIL = 0;
|
||||
countJL++; if (countJL < 0 || countJL > shortJ) countJL = 0;
|
||||
countKL++; if (countKL < 0 || countKL > shortK) countKL = 0;
|
||||
countLL++; if (countLL < 0 || countLL > shortL) countLL = 0;
|
||||
|
||||
countBR++; if (countBR < 0 || countBR > shortB) countBR = 0;
|
||||
countFR++; if (countFR < 0 || countFR > shortF) countFR = 0;
|
||||
countJR++; if (countJR < 0 || countJR > shortJ) countJR = 0;
|
||||
countNR++; if (countNR < 0 || countNR > shortN) countNR = 0;
|
||||
|
||||
double outIL = aIL[countIL-((countIL > shortI)?shortI+1:0)];
|
||||
double outJL = aJL[countJL-((countJL > shortJ)?shortJ+1:0)];
|
||||
double outKL = aKL[countKL-((countKL > shortK)?shortK+1:0)];
|
||||
double outLL = aLL[countLL-((countLL > shortL)?shortL+1:0)];
|
||||
|
||||
double outBR = aBR[countBR-((countBR > shortB)?shortB+1:0)];
|
||||
double outFR = aFR[countFR-((countFR > shortF)?shortF+1:0)];
|
||||
double outJR = aJR[countJR-((countJR > shortJ)?shortJ+1:0)];
|
||||
double outNR = aNR[countNR-((countNR > shortN)?shortN+1:0)];
|
||||
|
||||
aML[countML] = outIL - (outJL + outKL + outLL);
|
||||
aNL[countNL] = outJL - (outIL + outKL + outLL);
|
||||
aOL[countOL] = outKL - (outIL + outJL + outLL);
|
||||
aPL[countPL] = outLL - (outIL + outJL + outKL);
|
||||
|
||||
aAR[countAR] = outBR - (outFR + outJR + outNR);
|
||||
aER[countER] = outFR - (outBR + outJR + outNR);
|
||||
aIR[countIR] = outJR - (outBR + outFR + outNR);
|
||||
aMR[countMR] = outNR - (outBR + outFR + outJR);
|
||||
|
||||
countML++; if (countML < 0 || countML > shortM) countML = 0;
|
||||
countNL++; if (countNL < 0 || countNL > shortN) countNL = 0;
|
||||
countOL++; if (countOL < 0 || countOL > shortO) countOL = 0;
|
||||
countPL++; if (countPL < 0 || countPL > shortP) countPL = 0;
|
||||
|
||||
countAR++; if (countAR < 0 || countAR > shortA) countAR = 0;
|
||||
countER++; if (countER < 0 || countER > shortE) countER = 0;
|
||||
countIR++; if (countIR < 0 || countIR > shortI) countIR = 0;
|
||||
countMR++; if (countMR < 0 || countMR > shortM) countMR = 0;
|
||||
|
||||
double outML = aML[countML-((countML > shortM)?shortM+1:0)];
|
||||
double outNL = aNL[countNL-((countNL > shortN)?shortN+1:0)];
|
||||
double outOL = aOL[countOL-((countOL > shortO)?shortO+1:0)];
|
||||
double outPL = aPL[countPL-((countPL > shortP)?shortP+1:0)];
|
||||
|
||||
double outAR = aAR[countAR-((countAR > shortA)?shortA+1:0)];
|
||||
double outER = aER[countER-((countER > shortE)?shortE+1:0)];
|
||||
double outIR = aIR[countIR-((countIR > shortI)?shortI+1:0)];
|
||||
double outMR = aMR[countMR-((countMR > shortM)?shortM+1:0)];
|
||||
|
||||
feedbackAL = outML - (outNL + outOL + outPL);
|
||||
feedbackDR = outAR - (outER + outIR + outMR);
|
||||
feedbackBL = outNL - (outML + outOL + outPL);
|
||||
feedbackHR = outER - (outAR + outIR + outMR);
|
||||
feedbackCL = outOL - (outML + outNL + outPL);
|
||||
feedbackLR = outIR - (outAR + outER + outMR);
|
||||
feedbackDL = outPL - (outML + outNL + outOL);
|
||||
feedbackPR = outMR - (outAR + outER + outIR);
|
||||
//which we need to feed back into the input again, a bit
|
||||
|
||||
inputSampleL = (outML + outNL + outOL + outPL)/16.0;
|
||||
inputSampleR = (outAR + outER + outIR + outMR)/16.0;
|
||||
//and take the final combined sum of outputs, corrected for Householder gain
|
||||
lastTwoL = lastRefL;
|
||||
lastRefL = inputSampleL;
|
||||
lastStepL = lastTwoL - lastRefL;
|
||||
inputSampleL = lastTwoL;
|
||||
lastTwoR = lastRefR;
|
||||
lastRefR = inputSampleR;
|
||||
lastStepR = lastTwoR - lastRefR;
|
||||
inputSampleR = lastTwoR;
|
||||
} else {
|
||||
inputSampleL = lastTwoL - (lastStepL*cycle);
|
||||
inputSampleR = lastTwoR - (lastStepR*cycle);
|
||||
}
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
lastVerb = (inputSampleL+inputSampleR)*(derez*0.029);
|
||||
//discontinuity applied to downsample rate. Increasing this adds grunge,
|
||||
//reducing it falls back to a colder sound. It has to be a factor of derez
|
||||
//in order to work at both low and high derezzes.
|
||||
if (derez == 0.0) {
|
||||
inputSampleL = 0.0;
|
||||
inputSampleR = 0.0;
|
||||
}
|
||||
|
||||
if (wet < 1.0) {inputSampleL *= wet; inputSampleR *= wet;}
|
||||
if (dry < 1.0) {drySampleL *= dry; drySampleR *= dry;}
|
||||
inputSampleL += drySampleL; inputSampleR += drySampleR;
|
||||
//this is our submix verb dry/wet: 0.5 is BOTH at FULL VOLUME
|
||||
//purpose is that, if you're adding verb, you're not altering other balances
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
//inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//frexp((double)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
//inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//end 64 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
28
plugins/WinVST/CrunchCoat/VSTProject.sln
Executable file
28
plugins/WinVST/CrunchCoat/VSTProject.sln
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VSTProject", "VSTProject.vcxproj", "{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.Build.0 = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.ActiveCfg = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.Build.0 = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
plugins/WinVST/CrunchCoat/VSTProject.vcxproj
Executable file
183
plugins/WinVST/CrunchCoat/VSTProject.vcxproj
Executable file
|
|
@ -0,0 +1,183 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp" />
|
||||
<ClCompile Include="CrunchCoat.cpp" />
|
||||
<ClCompile Include="CrunchCoatProc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h" />
|
||||
<ClInclude Include="CrunchCoat.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
|
||||
<RootNamespace>VSTProject</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>CrunchCoat64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
48
plugins/WinVST/CrunchCoat/VSTProject.vcxproj.filters
Executable file
48
plugins/WinVST/CrunchCoat/VSTProject.vcxproj.filters
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CrunchCoat.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CrunchCoatProc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CrunchCoat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
19
plugins/WinVST/CrunchCoat/VSTProject.vcxproj.user
Executable file
19
plugins/WinVST/CrunchCoat/VSTProject.vcxproj.user
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
3
plugins/WinVST/CrunchCoat/vstplug.def
Executable file
3
plugins/WinVST/CrunchCoat/vstplug.def
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
VSTPluginMain
|
||||
main=VSTPluginMain
|
||||
Binary file not shown.
|
|
@ -39,20 +39,20 @@ void Pop3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram
|
|||
popCompL -= (popCompL * compAttack);
|
||||
popCompL += ((compThresh / fabs(inputSampleL))*compAttack);
|
||||
} else popCompL = (popCompL*(1.0-compRelease))+compRelease;
|
||||
if (popCompL < 0.0) popCompL = 0.0;
|
||||
if (fabs(inputSampleR) > compThresh) { //compression R
|
||||
popCompR -= (popCompR * compAttack);
|
||||
popCompR += ((compThresh / fabs(inputSampleR))*compAttack);
|
||||
} else popCompR = (popCompR*(1.0-compRelease))+compRelease;
|
||||
if (popCompR < 0.0) popCompR = 0.0;
|
||||
if (popCompL > popCompR) popCompL -= (popCompL * compAttack);
|
||||
if (popCompR > popCompL) popCompR -= (popCompR * compAttack);
|
||||
if (fabs(inputSampleL) > gateThresh) popGate = gateSustain;
|
||||
else if (fabs(inputSampleR) > gateThresh) popGate = gateSustain;
|
||||
else popGate *= (1.0-gateRelease);
|
||||
if (popGate < 0.0) popGate = 0.0;
|
||||
if (popCompL < 1.0) inputSampleL *= ((1.0-compRatio)+(popCompL*compRatio));
|
||||
if (popCompR < 1.0) inputSampleR *= ((1.0-compRatio)+(popCompR*compRatio));
|
||||
popCompL = fmax(fmin(popCompL,1.0),0.0);
|
||||
popCompR = fmax(fmin(popCompR,1.0),0.0);
|
||||
inputSampleL *= ((1.0-compRatio)+(popCompL*compRatio));
|
||||
inputSampleR *= ((1.0-compRatio)+(popCompR*compRatio));
|
||||
if (popGate < M_PI_2) {
|
||||
inputSampleL *= ((1.0-gateRatio)+(sin(popGate)*gateRatio));
|
||||
inputSampleR *= ((1.0-gateRatio)+(sin(popGate)*gateRatio));
|
||||
|
|
@ -109,20 +109,20 @@ void Pop3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa
|
|||
popCompL -= (popCompL * compAttack);
|
||||
popCompL += ((compThresh / fabs(inputSampleL))*compAttack);
|
||||
} else popCompL = (popCompL*(1.0-compRelease))+compRelease;
|
||||
if (popCompL < 0.0) popCompL = 0.0;
|
||||
if (fabs(inputSampleR) > compThresh) { //compression R
|
||||
popCompR -= (popCompR * compAttack);
|
||||
popCompR += ((compThresh / fabs(inputSampleR))*compAttack);
|
||||
} else popCompR = (popCompR*(1.0-compRelease))+compRelease;
|
||||
if (popCompR < 0.0) popCompR = 0.0;
|
||||
if (popCompL > popCompR) popCompL -= (popCompL * compAttack);
|
||||
if (popCompR > popCompL) popCompR -= (popCompR * compAttack);
|
||||
if (fabs(inputSampleL) > gateThresh) popGate = gateSustain;
|
||||
else if (fabs(inputSampleR) > gateThresh) popGate = gateSustain;
|
||||
else popGate *= (1.0-gateRelease);
|
||||
if (popGate < 0.0) popGate = 0.0;
|
||||
if (popCompL < 1.0) inputSampleL *= ((1.0-compRatio)+(popCompL*compRatio));
|
||||
if (popCompR < 1.0) inputSampleR *= ((1.0-compRatio)+(popCompR*compRatio));
|
||||
popCompL = fmax(fmin(popCompL,1.0),0.0);
|
||||
popCompR = fmax(fmin(popCompR,1.0),0.0);
|
||||
inputSampleL *= ((1.0-compRatio)+(popCompL*compRatio));
|
||||
inputSampleR *= ((1.0-compRatio)+(popCompR*compRatio));
|
||||
if (popGate < M_PI_2) {
|
||||
inputSampleL *= ((1.0-gateRatio)+(sin(popGate)*gateRatio));
|
||||
inputSampleR *= ((1.0-gateRatio)+(sin(popGate)*gateRatio));
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -30,7 +30,7 @@ void StoneFireComp::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
double stoneGain = H*2.0; stoneGain = pow(stoneGain,3);
|
||||
double stonePad = stoneGain; if (stonePad > 1.0) stonePad = 1.0;
|
||||
|
||||
double kalman = 1.0-pow(I,2);
|
||||
double kalman = 1.0-(pow(I,2)/overallscale);
|
||||
//crossover frequency between mid/bass
|
||||
double compRatio = 1.0-pow(1.0-J,2);
|
||||
|
||||
|
|
@ -106,36 +106,32 @@ void StoneFireComp::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
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 (fireCompL < 1.0) fireL *= (((1.0-compRatio)*firePad)+(fireCompL*compRatio*fireGain));
|
||||
else fireL *= firePad;
|
||||
if (fireCompR < 1.0) fireR *= (((1.0-compRatio)*firePad)+(fireCompR*compRatio*fireGain));
|
||||
else fireR *= firePad;
|
||||
fireCompL = fmax(fmin(fireCompL,1.0),0.0);
|
||||
fireCompR = fmax(fmin(fireCompR,1.0),0.0);
|
||||
fireL *= (((1.0-compRatio)*firePad)+(fireCompL*compRatio*fireGain));
|
||||
fireR *= (((1.0-compRatio)*firePad)+(fireCompR*compRatio*fireGain));
|
||||
|
||||
//stone dynamics
|
||||
if (fabs(stoneL) > compSThresh) { //compression L
|
||||
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 (stoneCompL < 1.0) stoneL *= (((1.0-compRatio)*stonePad)+(stoneCompL*compRatio*stoneGain));
|
||||
else stoneL *= stonePad;
|
||||
if (stoneCompR < 1.0) stoneR *= (((1.0-compRatio)*stonePad)+(stoneCompR*compRatio*stoneGain));
|
||||
else stoneR *= stonePad;
|
||||
stoneCompL = fmax(fmin(stoneCompL,1.0),0.0);
|
||||
stoneCompR = fmax(fmin(stoneCompR,1.0),0.0);
|
||||
stoneL *= (((1.0-compRatio)*stonePad)+(stoneCompL*compRatio*stoneGain));
|
||||
stoneR *= (((1.0-compRatio)*stonePad)+(stoneCompR*compRatio*stoneGain));
|
||||
|
||||
inputSampleL = stoneL+fireL;
|
||||
inputSampleR = stoneR+fireR;
|
||||
|
|
@ -182,7 +178,7 @@ void StoneFireComp::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
double stoneGain = H*2.0; stoneGain = pow(stoneGain,3);
|
||||
double stonePad = stoneGain; if (stonePad > 1.0) stonePad = 1.0;
|
||||
|
||||
double kalman = 1.0-pow(I,2);
|
||||
double kalman = 1.0-(pow(I,2)/overallscale);
|
||||
//crossover frequency between mid/bass
|
||||
double compRatio = 1.0-pow(1.0-J,2);
|
||||
|
||||
|
|
@ -258,36 +254,32 @@ void StoneFireComp::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
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 (fireCompL < 1.0) fireL *= (((1.0-compRatio)*firePad)+(fireCompL*compRatio*fireGain));
|
||||
else fireL *= firePad;
|
||||
if (fireCompR < 1.0) fireR *= (((1.0-compRatio)*firePad)+(fireCompR*compRatio*fireGain));
|
||||
else fireR *= firePad;
|
||||
fireCompL = fmax(fmin(fireCompL,1.0),0.0);
|
||||
fireCompR = fmax(fmin(fireCompR,1.0),0.0);
|
||||
fireL *= (((1.0-compRatio)*firePad)+(fireCompL*compRatio*fireGain));
|
||||
fireR *= (((1.0-compRatio)*firePad)+(fireCompR*compRatio*fireGain));
|
||||
|
||||
//stone dynamics
|
||||
if (fabs(stoneL) > compSThresh) { //compression L
|
||||
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 (stoneCompL < 1.0) stoneL *= (((1.0-compRatio)*stonePad)+(stoneCompL*compRatio*stoneGain));
|
||||
else stoneL *= stonePad;
|
||||
if (stoneCompR < 1.0) stoneR *= (((1.0-compRatio)*stonePad)+(stoneCompR*compRatio*stoneGain));
|
||||
else stoneR *= stonePad;
|
||||
stoneCompL = fmax(fmin(stoneCompL,1.0),0.0);
|
||||
stoneCompR = fmax(fmin(stoneCompR,1.0),0.0);
|
||||
stoneL *= (((1.0-compRatio)*stonePad)+(stoneCompL*compRatio*stoneGain));
|
||||
stoneR *= (((1.0-compRatio)*stonePad)+(stoneCompR*compRatio*stoneGain));
|
||||
|
||||
inputSampleL = stoneL+fireL;
|
||||
inputSampleR = stoneR+fireR;
|
||||
|
|
|
|||
BIN
plugins/WinVST/Wolfbot/.vs/Console4Channel64/v14/.suo
Executable file
BIN
plugins/WinVST/Wolfbot/.vs/Console4Channel64/v14/.suo
Executable file
Binary file not shown.
BIN
plugins/WinVST/Wolfbot/.vs/VSTProject/v14/.suo
Executable file
BIN
plugins/WinVST/Wolfbot/.vs/VSTProject/v14/.suo
Executable file
Binary file not shown.
28
plugins/WinVST/Wolfbot/VSTProject.sln
Executable file
28
plugins/WinVST/Wolfbot/VSTProject.sln
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VSTProject", "VSTProject.vcxproj", "{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.Build.0 = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.ActiveCfg = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.Build.0 = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
plugins/WinVST/Wolfbot/VSTProject.vcxproj
Executable file
183
plugins/WinVST/Wolfbot/VSTProject.vcxproj
Executable file
|
|
@ -0,0 +1,183 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp" />
|
||||
<ClCompile Include="Wolfbot.cpp" />
|
||||
<ClCompile Include="WolfbotProc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h" />
|
||||
<ClInclude Include="Wolfbot.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
|
||||
<RootNamespace>VSTProject</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>Wolfbot64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
48
plugins/WinVST/Wolfbot/VSTProject.vcxproj.filters
Executable file
48
plugins/WinVST/Wolfbot/VSTProject.vcxproj.filters
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Wolfbot.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WolfbotProc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Wolfbot.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
19
plugins/WinVST/Wolfbot/VSTProject.vcxproj.user
Executable file
19
plugins/WinVST/Wolfbot/VSTProject.vcxproj.user
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
106
plugins/WinVST/Wolfbot/Wolfbot.cpp
Executable file
106
plugins/WinVST/Wolfbot/Wolfbot.cpp
Executable file
|
|
@ -0,0 +1,106 @@
|
|||
/* ========================================
|
||||
* Wolfbot - Wolfbot.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __Wolfbot_H
|
||||
#include "Wolfbot.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Wolfbot(audioMaster);}
|
||||
|
||||
Wolfbot::Wolfbot(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
for (int x = 0; x < kal_total; x++) {kHP[x] = 0.0; kLP[x] = 0.0;}
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
|
||||
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
|
||||
_canDo.insert("x2in2out");
|
||||
setNumInputs(kNumInputs);
|
||||
setNumOutputs(kNumOutputs);
|
||||
setUniqueID(kUniqueId);
|
||||
canProcessReplacing(); // supports output replacing
|
||||
canDoubleReplacing(); // supports double precision processing
|
||||
programsAreChunks(true);
|
||||
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
|
||||
}
|
||||
|
||||
Wolfbot::~Wolfbot() {}
|
||||
VstInt32 Wolfbot::getVendorVersion () {return 1000;}
|
||||
void Wolfbot::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void Wolfbot::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);}
|
||||
//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than
|
||||
//trying to do versioning and preventing people from using older versions. Maybe they like the old one!
|
||||
|
||||
VstInt32 Wolfbot::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 Wolfbot::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Wolfbot::setParameter(VstInt32 index, float value) {
|
||||
switch (index) {
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float Wolfbot::getParameter(VstInt32 index) {
|
||||
switch (index) {
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
||||
void Wolfbot::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void Wolfbot::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void Wolfbot::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 Wolfbot::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool Wolfbot::getEffectName(char* name) {
|
||||
vst_strncpy(name, "Wolfbot", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory Wolfbot::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool Wolfbot::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows Wolfbot", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool Wolfbot::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
87
plugins/WinVST/Wolfbot/Wolfbot.h
Executable file
87
plugins/WinVST/Wolfbot/Wolfbot.h
Executable file
|
|
@ -0,0 +1,87 @@
|
|||
/* ========================================
|
||||
* Wolfbot - Wolfbot.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) Airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __Wolfbot_H
|
||||
#define __Wolfbot_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kNumParameters = 0
|
||||
}; //
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'wolf'; //Change this to what the AU identity is!
|
||||
|
||||
class Wolfbot :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
Wolfbot(audioMasterCallback audioMaster);
|
||||
~Wolfbot();
|
||||
virtual bool getEffectName(char* name); // The plug-in name
|
||||
virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in
|
||||
virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg
|
||||
virtual bool getVendorString(char* text); // Vendor info
|
||||
virtual VstInt32 getVendorVersion(); // Version number
|
||||
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
|
||||
virtual void getProgramName(char *name); // read the name from the host
|
||||
virtual void setProgramName(char *name); // changes the name of the preset displayed in the host
|
||||
virtual VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
virtual float getParameter(VstInt32 index); // get the parameter value at the specified index
|
||||
virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value
|
||||
virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB)
|
||||
virtual void getParameterName(VstInt32 index, char *text); // name of the parameter
|
||||
virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
enum {
|
||||
prevSampL1,
|
||||
prevSlewL1,
|
||||
accSlewL1,
|
||||
prevSampL2,
|
||||
prevSlewL2,
|
||||
accSlewL2,
|
||||
prevSampL3,
|
||||
prevSlewL3,
|
||||
accSlewL3,
|
||||
kalGainL,
|
||||
kalOutL,
|
||||
prevSampR1,
|
||||
prevSlewR1,
|
||||
accSlewR1,
|
||||
prevSampR2,
|
||||
prevSlewR2,
|
||||
accSlewR2,
|
||||
prevSampR3,
|
||||
prevSlewR3,
|
||||
accSlewR3,
|
||||
kalGainR,
|
||||
kalOutR,
|
||||
kal_total
|
||||
};
|
||||
double kHP[kal_total];
|
||||
double kLP[kal_total];
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
//default stuff
|
||||
};
|
||||
|
||||
#endif
|
||||
334
plugins/WinVST/Wolfbot/WolfbotProc.cpp
Executable file
334
plugins/WinVST/Wolfbot/WolfbotProc.cpp
Executable file
|
|
@ -0,0 +1,334 @@
|
|||
/* ========================================
|
||||
* Wolfbot - Wolfbot.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __Wolfbot_H
|
||||
#include "Wolfbot.h"
|
||||
#endif
|
||||
|
||||
void Wolfbot::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
float* in1 = inputs[0];
|
||||
float* in2 = inputs[1];
|
||||
float* out1 = outputs[0];
|
||||
float* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
double kalHP = 1.0-(0.004225/overallscale);
|
||||
double kalLP = 1.0-(0.954529/overallscale);
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
//begin Kalman Filter L
|
||||
double dryKal = inputSampleL = inputSampleL*(1.0-kalHP)*0.777;
|
||||
inputSampleL *= (1.0-kalHP);
|
||||
//set up gain levels to control the beast
|
||||
kHP[prevSlewL3] += kHP[prevSampL3] - kHP[prevSampL2]; kHP[prevSlewL3] *= 0.5;
|
||||
kHP[prevSlewL2] += kHP[prevSampL2] - kHP[prevSampL1]; kHP[prevSlewL2] *= 0.5;
|
||||
kHP[prevSlewL1] += kHP[prevSampL1] - inputSampleL; kHP[prevSlewL1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kHP[accSlewL2] += kHP[prevSlewL3] - kHP[prevSlewL2]; kHP[accSlewL2] *= 0.5;
|
||||
kHP[accSlewL1] += kHP[prevSlewL2] - kHP[prevSlewL1]; kHP[accSlewL1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kHP[accSlewL3] += (kHP[accSlewL2] - kHP[accSlewL1]); kHP[accSlewL3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kHP[kalOutL] += kHP[prevSampL1] + kHP[prevSlewL2] + kHP[accSlewL3]; kHP[kalOutL] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kHP[kalGainL] += fabs(dryKal-kHP[kalOutL])*kalHP*8.0; kHP[kalGainL] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kHP[kalGainL] > kalHP*0.5) kHP[kalGainL] = kalHP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kHP[kalOutL] += (dryKal*(1.0-(0.68+(kalHP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kHP[prevSampL3] = kHP[prevSampL2];
|
||||
kHP[prevSampL2] = kHP[prevSampL1];
|
||||
kHP[prevSampL1] = (kHP[kalGainL] * kHP[kalOutL]) + ((1.0-kHP[kalGainL])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kHP[prevSampL1] > 1.0) kHP[prevSampL1] = 1.0;
|
||||
if (kHP[prevSampL1] < -1.0) kHP[prevSampL1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleL = drySampleL+(kHP[kalOutL]*-0.777); //highpass
|
||||
|
||||
//begin Kalman Filter L
|
||||
dryKal = inputSampleL = inputSampleL*(1.0-kalLP)*0.777;
|
||||
inputSampleL *= (1.0-kalLP);
|
||||
//set up gain levels to control the beast
|
||||
kLP[prevSlewL3] += kLP[prevSampL3] - kLP[prevSampL2]; kLP[prevSlewL3] *= 0.5;
|
||||
kLP[prevSlewL2] += kLP[prevSampL2] - kLP[prevSampL1]; kLP[prevSlewL2] *= 0.5;
|
||||
kLP[prevSlewL1] += kLP[prevSampL1] - inputSampleL; kLP[prevSlewL1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kLP[accSlewL2] += kLP[prevSlewL3] - kLP[prevSlewL2]; kLP[accSlewL2] *= 0.5;
|
||||
kLP[accSlewL1] += kLP[prevSlewL2] - kLP[prevSlewL1]; kLP[accSlewL1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kLP[accSlewL3] += (kLP[accSlewL2] - kLP[accSlewL1]); kLP[accSlewL3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kLP[kalOutL] += kLP[prevSampL1] + kLP[prevSlewL2] + kLP[accSlewL3]; kLP[kalOutL] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kLP[kalGainL] += fabs(dryKal-kLP[kalOutL])*kalLP*8.0; kLP[kalGainL] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kLP[kalGainL] > kalLP*0.5) kLP[kalGainL] = kalLP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kLP[kalOutL] += (dryKal*(1.0-(0.68+(kalLP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kLP[prevSampL3] = kLP[prevSampL2];
|
||||
kLP[prevSampL2] = kLP[prevSampL1];
|
||||
kLP[prevSampL1] = (kLP[kalGainL] * kLP[kalOutL]) + ((1.0-kLP[kalGainL])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kLP[prevSampL1] > 1.0) kLP[prevSampL1] = 1.0;
|
||||
if (kLP[prevSampL1] < -1.0) kLP[prevSampL1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleL = sin(kLP[kalOutL]*0.7943)*1.2589; //lowpass
|
||||
|
||||
|
||||
//begin Kalman Filter R
|
||||
dryKal = inputSampleR = inputSampleR*(1.0-kalHP)*0.777;
|
||||
inputSampleR *= (1.0-kalHP);
|
||||
//set up gain levels to control the beast
|
||||
kHP[prevSlewR3] += kHP[prevSampR3] - kHP[prevSampR2]; kHP[prevSlewR3] *= 0.5;
|
||||
kHP[prevSlewR2] += kHP[prevSampR2] - kHP[prevSampR1]; kHP[prevSlewR2] *= 0.5;
|
||||
kHP[prevSlewR1] += kHP[prevSampR1] - inputSampleR; kHP[prevSlewR1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kHP[accSlewR2] += kHP[prevSlewR3] - kHP[prevSlewR2]; kHP[accSlewR2] *= 0.5;
|
||||
kHP[accSlewR1] += kHP[prevSlewR2] - kHP[prevSlewR1]; kHP[accSlewR1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kHP[accSlewR3] += (kHP[accSlewR2] - kHP[accSlewR1]); kHP[accSlewR3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kHP[kalOutR] += kHP[prevSampR1] + kHP[prevSlewR2] + kHP[accSlewR3]; kHP[kalOutR] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kHP[kalGainR] += fabs(dryKal-kHP[kalOutR])*kalHP*8.0; kHP[kalGainR] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kHP[kalGainR] > kalHP*0.5) kHP[kalGainR] = kalHP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kHP[kalOutR] += (dryKal*(1.0-(0.68+(kalHP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kHP[prevSampR3] = kHP[prevSampR2];
|
||||
kHP[prevSampR2] = kHP[prevSampR1];
|
||||
kHP[prevSampR1] = (kHP[kalGainR] * kHP[kalOutR]) + ((1.0-kHP[kalGainR])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kHP[prevSampR1] > 1.0) kHP[prevSampR1] = 1.0;
|
||||
if (kHP[prevSampR1] < -1.0) kHP[prevSampR1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleR = drySampleR+(kHP[kalOutR]*-0.777); //highpass
|
||||
|
||||
//begin Kalman Filter R
|
||||
dryKal = inputSampleR = inputSampleR*(1.0-kalLP)*0.777;
|
||||
inputSampleR *= (1.0-kalLP);
|
||||
//set up gain levels to control the beast
|
||||
kLP[prevSlewR3] += kLP[prevSampR3] - kLP[prevSampR2]; kLP[prevSlewR3] *= 0.5;
|
||||
kLP[prevSlewR2] += kLP[prevSampR2] - kLP[prevSampR1]; kLP[prevSlewR2] *= 0.5;
|
||||
kLP[prevSlewR1] += kLP[prevSampR1] - inputSampleR; kLP[prevSlewR1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kLP[accSlewR2] += kLP[prevSlewR3] - kLP[prevSlewR2]; kLP[accSlewR2] *= 0.5;
|
||||
kLP[accSlewR1] += kLP[prevSlewR2] - kLP[prevSlewR1]; kLP[accSlewR1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kLP[accSlewR3] += (kLP[accSlewR2] - kLP[accSlewR1]); kLP[accSlewR3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kLP[kalOutR] += kLP[prevSampR1] + kLP[prevSlewR2] + kLP[accSlewR3]; kLP[kalOutR] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kLP[kalGainR] += fabs(dryKal-kLP[kalOutR])*kalLP*8.0; kLP[kalGainR] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kLP[kalGainR] > kalLP*0.5) kLP[kalGainR] = kalLP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kLP[kalOutR] += (dryKal*(1.0-(0.68+(kalLP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kLP[prevSampR3] = kLP[prevSampR2];
|
||||
kLP[prevSampR2] = kLP[prevSampR1];
|
||||
kLP[prevSampR1] = (kLP[kalGainR] * kLP[kalOutR]) + ((1.0-kLP[kalGainR])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kLP[prevSampR1] > 1.0) kLP[prevSampR1] = 1.0;
|
||||
if (kLP[prevSampR1] < -1.0) kLP[prevSampR1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleR = sin(kLP[kalOutR]*0.7943)*1.2589; //lowpass
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
|
||||
void Wolfbot::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
double* out1 = outputs[0];
|
||||
double* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
double kalHP = 1.0-(0.004225/overallscale);
|
||||
double kalLP = 1.0-(0.954529/overallscale);
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
//begin Kalman Filter L
|
||||
double dryKal = inputSampleL = inputSampleL*(1.0-kalHP)*0.777;
|
||||
inputSampleL *= (1.0-kalHP);
|
||||
//set up gain levels to control the beast
|
||||
kHP[prevSlewL3] += kHP[prevSampL3] - kHP[prevSampL2]; kHP[prevSlewL3] *= 0.5;
|
||||
kHP[prevSlewL2] += kHP[prevSampL2] - kHP[prevSampL1]; kHP[prevSlewL2] *= 0.5;
|
||||
kHP[prevSlewL1] += kHP[prevSampL1] - inputSampleL; kHP[prevSlewL1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kHP[accSlewL2] += kHP[prevSlewL3] - kHP[prevSlewL2]; kHP[accSlewL2] *= 0.5;
|
||||
kHP[accSlewL1] += kHP[prevSlewL2] - kHP[prevSlewL1]; kHP[accSlewL1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kHP[accSlewL3] += (kHP[accSlewL2] - kHP[accSlewL1]); kHP[accSlewL3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kHP[kalOutL] += kHP[prevSampL1] + kHP[prevSlewL2] + kHP[accSlewL3]; kHP[kalOutL] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kHP[kalGainL] += fabs(dryKal-kHP[kalOutL])*kalHP*8.0; kHP[kalGainL] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kHP[kalGainL] > kalHP*0.5) kHP[kalGainL] = kalHP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kHP[kalOutL] += (dryKal*(1.0-(0.68+(kalHP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kHP[prevSampL3] = kHP[prevSampL2];
|
||||
kHP[prevSampL2] = kHP[prevSampL1];
|
||||
kHP[prevSampL1] = (kHP[kalGainL] * kHP[kalOutL]) + ((1.0-kHP[kalGainL])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kHP[prevSampL1] > 1.0) kHP[prevSampL1] = 1.0;
|
||||
if (kHP[prevSampL1] < -1.0) kHP[prevSampL1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleL = drySampleL+(kHP[kalOutL]*-0.777); //highpass
|
||||
|
||||
//begin Kalman Filter L
|
||||
dryKal = inputSampleL = inputSampleL*(1.0-kalLP)*0.777;
|
||||
inputSampleL *= (1.0-kalLP);
|
||||
//set up gain levels to control the beast
|
||||
kLP[prevSlewL3] += kLP[prevSampL3] - kLP[prevSampL2]; kLP[prevSlewL3] *= 0.5;
|
||||
kLP[prevSlewL2] += kLP[prevSampL2] - kLP[prevSampL1]; kLP[prevSlewL2] *= 0.5;
|
||||
kLP[prevSlewL1] += kLP[prevSampL1] - inputSampleL; kLP[prevSlewL1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kLP[accSlewL2] += kLP[prevSlewL3] - kLP[prevSlewL2]; kLP[accSlewL2] *= 0.5;
|
||||
kLP[accSlewL1] += kLP[prevSlewL2] - kLP[prevSlewL1]; kLP[accSlewL1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kLP[accSlewL3] += (kLP[accSlewL2] - kLP[accSlewL1]); kLP[accSlewL3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kLP[kalOutL] += kLP[prevSampL1] + kLP[prevSlewL2] + kLP[accSlewL3]; kLP[kalOutL] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kLP[kalGainL] += fabs(dryKal-kLP[kalOutL])*kalLP*8.0; kLP[kalGainL] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kLP[kalGainL] > kalLP*0.5) kLP[kalGainL] = kalLP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kLP[kalOutL] += (dryKal*(1.0-(0.68+(kalLP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kLP[prevSampL3] = kLP[prevSampL2];
|
||||
kLP[prevSampL2] = kLP[prevSampL1];
|
||||
kLP[prevSampL1] = (kLP[kalGainL] * kLP[kalOutL]) + ((1.0-kLP[kalGainL])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kLP[prevSampL1] > 1.0) kLP[prevSampL1] = 1.0;
|
||||
if (kLP[prevSampL1] < -1.0) kLP[prevSampL1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleL = sin(kLP[kalOutL]*0.7943)*1.2589; //lowpass
|
||||
|
||||
|
||||
//begin Kalman Filter R
|
||||
dryKal = inputSampleR = inputSampleR*(1.0-kalHP)*0.777;
|
||||
inputSampleR *= (1.0-kalHP);
|
||||
//set up gain levels to control the beast
|
||||
kHP[prevSlewR3] += kHP[prevSampR3] - kHP[prevSampR2]; kHP[prevSlewR3] *= 0.5;
|
||||
kHP[prevSlewR2] += kHP[prevSampR2] - kHP[prevSampR1]; kHP[prevSlewR2] *= 0.5;
|
||||
kHP[prevSlewR1] += kHP[prevSampR1] - inputSampleR; kHP[prevSlewR1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kHP[accSlewR2] += kHP[prevSlewR3] - kHP[prevSlewR2]; kHP[accSlewR2] *= 0.5;
|
||||
kHP[accSlewR1] += kHP[prevSlewR2] - kHP[prevSlewR1]; kHP[accSlewR1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kHP[accSlewR3] += (kHP[accSlewR2] - kHP[accSlewR1]); kHP[accSlewR3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kHP[kalOutR] += kHP[prevSampR1] + kHP[prevSlewR2] + kHP[accSlewR3]; kHP[kalOutR] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kHP[kalGainR] += fabs(dryKal-kHP[kalOutR])*kalHP*8.0; kHP[kalGainR] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kHP[kalGainR] > kalHP*0.5) kHP[kalGainR] = kalHP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kHP[kalOutR] += (dryKal*(1.0-(0.68+(kalHP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kHP[prevSampR3] = kHP[prevSampR2];
|
||||
kHP[prevSampR2] = kHP[prevSampR1];
|
||||
kHP[prevSampR1] = (kHP[kalGainR] * kHP[kalOutR]) + ((1.0-kHP[kalGainR])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kHP[prevSampR1] > 1.0) kHP[prevSampR1] = 1.0;
|
||||
if (kHP[prevSampR1] < -1.0) kHP[prevSampR1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleR = drySampleR+(kHP[kalOutR]*-0.777); //highpass
|
||||
|
||||
//begin Kalman Filter R
|
||||
dryKal = inputSampleR = inputSampleR*(1.0-kalLP)*0.777;
|
||||
inputSampleR *= (1.0-kalLP);
|
||||
//set up gain levels to control the beast
|
||||
kLP[prevSlewR3] += kLP[prevSampR3] - kLP[prevSampR2]; kLP[prevSlewR3] *= 0.5;
|
||||
kLP[prevSlewR2] += kLP[prevSampR2] - kLP[prevSampR1]; kLP[prevSlewR2] *= 0.5;
|
||||
kLP[prevSlewR1] += kLP[prevSampR1] - inputSampleR; kLP[prevSlewR1] *= 0.5;
|
||||
//make slews from each set of samples used
|
||||
kLP[accSlewR2] += kLP[prevSlewR3] - kLP[prevSlewR2]; kLP[accSlewR2] *= 0.5;
|
||||
kLP[accSlewR1] += kLP[prevSlewR2] - kLP[prevSlewR1]; kLP[accSlewR1] *= 0.5;
|
||||
//differences between slews: rate of change of rate of change
|
||||
kLP[accSlewR3] += (kLP[accSlewR2] - kLP[accSlewR1]); kLP[accSlewR3] *= 0.5;
|
||||
//entering the abyss, what even is this
|
||||
kLP[kalOutR] += kLP[prevSampR1] + kLP[prevSlewR2] + kLP[accSlewR3]; kLP[kalOutR] *= 0.5;
|
||||
//resynthesizing predicted result (all iir smoothed)
|
||||
kLP[kalGainR] += fabs(dryKal-kLP[kalOutR])*kalLP*8.0; kLP[kalGainR] *= 0.5;
|
||||
//madness takes its toll. Kalman Gain: how much dry to retain
|
||||
if (kLP[kalGainR] > kalLP*0.5) kLP[kalGainR] = kalLP*0.5;
|
||||
//attempts to avoid explosions
|
||||
kLP[kalOutR] += (dryKal*(1.0-(0.68+(kalLP*0.157))));
|
||||
//this is for tuning a really complete cancellation up around Nyquist
|
||||
kLP[prevSampR3] = kLP[prevSampR2];
|
||||
kLP[prevSampR2] = kLP[prevSampR1];
|
||||
kLP[prevSampR1] = (kLP[kalGainR] * kLP[kalOutR]) + ((1.0-kLP[kalGainR])*dryKal);
|
||||
//feed the chain of previous samples
|
||||
if (kLP[prevSampR1] > 1.0) kLP[prevSampR1] = 1.0;
|
||||
if (kLP[prevSampR1] < -1.0) kLP[prevSampR1] = -1.0;
|
||||
//end Kalman Filter, except for trim on output
|
||||
inputSampleR = sin(kLP[kalOutR]*0.7943)*1.2589; //lowpass
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
//inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//frexp((double)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
//inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//end 64 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
3
plugins/WinVST/Wolfbot/vstplug.def
Executable file
3
plugins/WinVST/Wolfbot/vstplug.def
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
VSTPluginMain
|
||||
main=VSTPluginMain
|
||||
Loading…
Add table
Add a link
Reference in a new issue