Fussing with codebase: beware errors

This commit is contained in:
Christopher Johnson 2022-02-26 15:52:46 -05:00
parent 54fd8c7a18
commit 2336d31220
1062 changed files with 3132 additions and 9576 deletions

View file

@ -24,7 +24,7 @@ ADT::ADT(audioMasterCallback audioMaster) :
offsetB = 9001; // :D
gcount = 0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -64,7 +64,8 @@ private:
double offsetB;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
float A;

View file

@ -32,8 +32,8 @@ void ADT::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrame
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (fabs(offsetA - targetA) > 1000) offsetA = targetA;

View file

@ -19,7 +19,7 @@ Apicolypse::Apicolypse(audioMasterCallback audioMaster) :
for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;}
lastSampleR = 0.0;lastSampleL = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -39,8 +39,8 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;
@ -166,11 +166,11 @@ void Apicolypse::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -50,42 +50,8 @@ void AtmosphereBuss::processReplacing(float **inputs, float **outputs, VstInt32
inputSampleL = *in1;
inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
chasespeed *= 0.9999;
chasespeed -= 0.01;
@ -311,42 +277,8 @@ void AtmosphereBuss::processDoubleReplacing(double **inputs, double **outputs, V
inputSampleL = *in1;
inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
chasespeed *= 0.9999;
chasespeed -= 0.01;

View file

@ -50,42 +50,8 @@ void AtmosphereChannel::processReplacing(float **inputs, float **outputs, VstInt
inputSampleL = *in1;
inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
chasespeed *= 0.9999;
chasespeed -= 0.01;
@ -306,42 +272,8 @@ void AtmosphereChannel::processDoubleReplacing(double **inputs, double **outputs
inputSampleL = *in1;
inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
chasespeed *= 0.9999;
chasespeed -= 0.01;

View file

@ -22,7 +22,7 @@ AverMatrix::AverMatrix(audioMasterCallback audioMaster) :
}
}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -50,8 +50,8 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -81,11 +81,11 @@ void AverMatrix::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -135,7 +135,7 @@ BassAmp::BassAmp(audioMasterCallback audioMaster) :
ataK3 = 0.114; //add raw to interpolated dry, toughens
ataK4 = 0.886; //remainder of interpolated dry, adds up to 1.0
ataK5 = 0.122; //subtract this much prev. diff sample, brightens
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -56,7 +56,7 @@ BassDrive::BassDrive(audioMasterCallback audioMaster) :
flip = false;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -27,8 +27,8 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
sumL = 0.0;
sumR = 0.0;
@ -314,11 +314,11 @@ void BassDrive::processReplacing(float **inputs, float **outputs, VstInt32 sampl
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -36,42 +36,8 @@ void BassKit::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
ataLowpass = (inputSampleL + inputSampleR) / 2.0;
iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA;
@ -252,42 +218,8 @@ void BassKit::processDoubleReplacing(double **inputs, double **outputs, VstInt32
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
ataLowpass = (inputSampleL + inputSampleR) / 2.0;
iirDriveSampleA = (iirDriveSampleA * (1.0 - HeadBumpFreq)) + (ataLowpass * HeadBumpFreq); ataLowpass = iirDriveSampleA;

View file

@ -26,7 +26,7 @@ Baxandall::Baxandall(audioMasterCallback audioMaster) :
bassBR[x] = 0.0;
}
flip = false;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -47,8 +47,8 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (output != 1.0) {
inputSampleL *= output;
@ -127,11 +127,11 @@ void Baxandall::processReplacing(float **inputs, float **outputs, VstInt32 sampl
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -19,7 +19,7 @@ Beam::Beam(audioMasterCallback audioMaster) :
lastSampleL[count] = 0;
lastSampleR[count] = 0;
}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -17,7 +17,7 @@ Biquad::Biquad(audioMasterCallback audioMaster) :
B = 0.5;
C = 0.5;
D = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -90,8 +90,8 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -147,11 +147,11 @@ void Biquad::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -30,7 +30,7 @@ Biquad2::Biquad2(audioMasterCallback audioMaster) :
C = 0.5;
D = 1.0;
E = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -81,8 +81,8 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -202,11 +202,11 @@ void Biquad2::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -17,7 +17,7 @@ BiquadDouble::BiquadDouble(audioMasterCallback audioMaster) :
B = 0.5;
C = 0.5;
D = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -91,8 +91,8 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -138,11 +138,11 @@ void BiquadDouble::processReplacing(float **inputs, float **outputs, VstInt32 sa
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -18,7 +18,7 @@ BiquadOneHalf::BiquadOneHalf(audioMasterCallback audioMaster) :
B = 0.0;
C = 0.0;
D = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -89,8 +89,8 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -142,11 +142,11 @@ void BiquadOneHalf::processReplacing(float **inputs, float **outputs, VstInt32 s
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -17,7 +17,7 @@ BiquadTriple::BiquadTriple(audioMasterCallback audioMaster) :
B = 0.5;
C = 0.5;
D = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -92,8 +92,8 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -150,11 +150,11 @@ void BiquadTriple::processReplacing(float **inputs, float **outputs, VstInt32 sa
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -17,7 +17,7 @@ BitGlitter::BitGlitter(audioMasterCallback audioMaster) :
C = 0.5;
D = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
ataLastSampleL = 0.0;
ataHalfwaySampleL = 0.0;

View file

@ -55,7 +55,8 @@ private:
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
double ataLastSampleL;
double ataHalfwaySampleL;

View file

@ -34,8 +34,8 @@ void BitGlitter::processReplacing(float **inputs, float **outputs, VstInt32 samp
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;

View file

@ -14,7 +14,7 @@ BlockParty::BlockParty(audioMasterCallback audioMaster) :
{
A = 0.0;
B = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
muSpeedAL = 10000;
muSpeedBL = 10000;

View file

@ -53,7 +53,8 @@ private:
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
float A;

View file

@ -32,42 +32,8 @@ void BlockParty::processReplacing(float **inputs, float **outputs, VstInt32 samp
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -593,42 +559,8 @@ void BlockParty::processDoubleReplacing(double **inputs, double **outputs, VstIn
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -30,7 +30,7 @@ BrassRider::BrassRider(audioMasterCallback audioMaster) :
lastSampleR = 0.0;
lastSlewR = 0.0;
gcount = 0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -24,42 +24,8 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -132,11 +98,11 @@ void BrassRider::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;
@ -166,42 +132,8 @@ void BrassRider::processDoubleReplacing(double **inputs, double **outputs, VstIn
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -17,7 +17,7 @@ BrightAmbience::BrightAmbience(audioMasterCallback audioMaster) :
A = 0.0;
B = 0.0;
C = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -25,8 +25,8 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (gcount < 0 || gcount > 12680) {gcount = 12680;}
count = gcount;
@ -322,11 +322,11 @@ void BrightAmbience::processReplacing(float **inputs, float **outputs, VstInt32
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -19,7 +19,7 @@ BrightAmbience2::BrightAmbience2(audioMasterCallback audioMaster) :
B = 0.2;
C = 0.0;
D = 0.5;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -24,8 +24,8 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
double tempL = 0.0;
@ -58,11 +58,11 @@ void BrightAmbience2::processReplacing(float **inputs, float **outputs, VstInt32
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -18,7 +18,7 @@ Calibre::Calibre(audioMasterCallback audioMaster) :
D = 1.0;
for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;}
lastSampleR = 0.0;lastSampleL = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -39,8 +39,8 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;
@ -171,11 +171,11 @@ void Calibre::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -52,7 +52,7 @@ Capacitor2::Capacitor2(audioMasterCallback audioMaster) :
lastHighpass = 1000.0;
lastWet = 1000.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -32,8 +32,8 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -153,11 +153,11 @@ void Capacitor2::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -26,42 +26,8 @@ void Channel5::processReplacing(float **inputs, float **outputs, VstInt32 sample
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (fpFlip)
{
@ -161,42 +127,8 @@ void Channel5::processDoubleReplacing(double **inputs, double **outputs, VstInt3
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (fpFlip)
{

View file

@ -15,7 +15,7 @@ Channel6::Channel6(audioMasterCallback audioMaster) :
consoletype = 0.0;
drive = 0.0;
output = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
iirSampleLA = 0.0;
iirSampleRA = 0.0;
iirSampleLB = 0.0;

View file

@ -54,7 +54,8 @@ private:
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
double iirSampleLA;
double iirSampleRA;

View file

@ -26,8 +26,8 @@ void Channel6::processReplacing(float **inputs, float **outputs, VstInt32 sample
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (flip)

View file

@ -15,7 +15,7 @@ Channel7::Channel7(audioMasterCallback audioMaster) :
consoletype = 0.0;
drive = 0.0;
output = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
iirSampleLA = 0.0;
iirSampleRA = 0.0;
iirSampleLB = 0.0;

View file

@ -28,8 +28,8 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (flip)
{
@ -96,11 +96,11 @@ void Channel7::processReplacing(float **inputs, float **outputs, VstInt32 sample
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -15,7 +15,7 @@ Channel8::Channel8(audioMasterCallback audioMaster) :
consoletype = 0.0;
drive = 0.0;
output = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
iirSampleLA = 0.0;
iirSampleRA = 0.0;
iirSampleLB = 0.0;

View file

@ -29,8 +29,8 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
double dielectricScaleL = fabs(2.0-((inputSampleL+nonLin)/nonLin));
double dielectricScaleR = fabs(2.0-((inputSampleR+nonLin)/nonLin));
@ -120,11 +120,11 @@ void Channel8::processReplacing(float **inputs, float **outputs, VstInt32 sample
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -31,7 +31,7 @@ ChromeOxide::ChromeOxide(audioMasterCallback audioMaster) :
flip = false;
A = 0.5;
B = 0.5;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -48,8 +48,8 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;
@ -152,11 +152,11 @@ void ChromeOxide::processReplacing(float **inputs, float **outputs, VstInt32 sam
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -18,7 +18,7 @@ Cider::Cider(audioMasterCallback audioMaster) :
D = 1.0;
for(int count = 0; count < 34; count++) {bR[count] = 0;bL[count] = 0;}
lastSampleR = 0.0;lastSampleL = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -39,8 +39,8 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;
@ -169,11 +169,11 @@ void Cider::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -16,7 +16,7 @@ Coils::Coils(audioMasterCallback audioMaster) :
B = 0.5;
C = 1.0;
for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -34,8 +34,8 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -74,11 +74,11 @@ void Coils::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -27,42 +27,8 @@ void Cojones::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -197,42 +163,8 @@ void Cojones::processDoubleReplacing(double **inputs, double **outputs, VstInt32
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -25,7 +25,7 @@ Compresaturator::Compresaturator(audioMasterCallback audioMaster) :
lastWidthR = 500;
padFactorR = 0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -56,7 +56,8 @@ private:
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
int dCount;

View file

@ -28,42 +28,8 @@ void Compresaturator::processReplacing(float **inputs, float **outputs, VstInt32
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -243,42 +209,8 @@ void Compresaturator::processDoubleReplacing(double **inputs, double **outputs,
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -13,7 +13,7 @@ Console6Buss::Console6Buss(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -20,8 +20,8 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (gain != 1.0) {
@ -47,11 +47,11 @@ void Console6Buss::processReplacing(float **inputs, float **outputs, VstInt32 sa
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -13,7 +13,7 @@ Console6Channel::Console6Channel(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -20,8 +20,8 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (gain != 1.0) {
@ -47,11 +47,11 @@ void Console6Channel::processReplacing(float **inputs, float **outputs, VstInt32
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -40,42 +40,8 @@ void Crystal::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;
@ -243,42 +209,8 @@ void Crystal::processDoubleReplacing(double **inputs, double **outputs, VstInt32
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL *= indrive;
inputSampleR *= indrive;

View file

@ -14,7 +14,7 @@ Dark::Dark(audioMasterCallback audioMaster) :
{
A = 1.0;
B = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
for(int count = 0; count < 99; count++) {
lastSampleL[count] = 0;
lastSampleR[count] = 0;

View file

@ -29,7 +29,7 @@ DeBess::DeBess(audioMasterCallback audioMaster) :
iirSampleBR = 0.0;
flip = false;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -30,8 +30,8 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
sL[0] = inputSampleL; //set up so both [0] and [1] will be input sample
sR[0] = inputSampleR; //set up so both [0] and [1] will be input sample
@ -92,11 +92,11 @@ void DeBess::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -25,7 +25,7 @@ DeHiss::DeHiss(audioMasterCallback audioMaster) :
gateR = 1.0;
rawR = 2.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -37,8 +37,8 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -121,11 +121,11 @@ void DeHiss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -29,7 +29,7 @@ DeRez2::DeRez2(audioMasterCallback audioMaster) :
position = 0.0;
incrementA = 0.0;
incrementB = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -30,8 +30,8 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -168,11 +168,11 @@ void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -13,7 +13,7 @@ Deckwrecka::Deckwrecka(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
bflip = 1;
iirHeadBumpAL = 0.0;

View file

@ -35,8 +35,8 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
bflip++;
if (bflip < 1 || bflip > 3) bflip = 1;
@ -175,11 +175,11 @@ void Deckwrecka::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -20,7 +20,7 @@ DigitalBlack::DigitalBlack(audioMasterCallback audioMaster) :
WasNegativeR = false;
ZeroCrossR = 0;
gaterollerR = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -26,8 +26,8 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -91,11 +91,11 @@ void DigitalBlack::processReplacing(float **inputs, float **outputs, VstInt32 sa
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -46,42 +46,8 @@ void Distance2::processReplacing(float **inputs, float **outputs, VstInt32 sampl
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -324,42 +290,8 @@ void Distance2::processDoubleReplacing(double **inputs, double **outputs, VstInt
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -20,7 +20,7 @@ Distortion::Distortion(audioMasterCallback audioMaster) :
previousInL[x] = 0.0; previousOutL[x] = 0.0;
previousInR[x] = 0.0; previousOutR[x] = 0.0;
}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -25,8 +25,8 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -111,11 +111,11 @@ void Distortion::processReplacing(float **inputs, float **outputs, VstInt32 samp
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;
@ -146,8 +146,8 @@ void Distortion::processDoubleReplacing(double **inputs, double **outputs, VstIn
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;

View file

@ -14,7 +14,7 @@ DitherFloat::DitherFloat(audioMasterCallback audioMaster) :
{
A = 0.0;
B = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -52,42 +52,8 @@ void DubCenter::processReplacing(float **inputs, float **outputs, VstInt32 sampl
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -369,42 +335,8 @@ void DubCenter::processDoubleReplacing(double **inputs, double **outputs, VstInt
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -13,7 +13,7 @@ Dyno::Dyno(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.5;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -20,8 +20,8 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
if (gain != 1.0) {
inputSampleL *= gain;
@ -37,11 +37,11 @@ void Dyno::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -23,7 +23,7 @@ Elation::Elation(audioMasterCallback audioMaster) :
compCR = 1.0; compDR = 1.0; previousBR = 0.0;
flip = false;
lastSampleR = 0.0;lastSampleL = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -36,8 +36,8 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -270,11 +270,11 @@ void Elation::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -30,42 +30,8 @@ void Energy::processReplacing(float **inputs, float **outputs, VstInt32 sampleFr
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
double correctionL = 0.0;
double correctionR = 0.0;
@ -784,42 +750,8 @@ void Energy::processDoubleReplacing(double **inputs, double **outputs, VstInt32
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
double correctionL = 0.0;
double correctionR = 0.0;

View file

@ -13,7 +13,7 @@ Facet::Facet(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -20,8 +20,8 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
@ -47,11 +47,11 @@ void Facet::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -39,42 +39,8 @@ void Floor::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -298,42 +264,8 @@ void Floor::processDoubleReplacing(double **inputs, double **outputs, VstInt32 s
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -18,7 +18,7 @@ Focus::Focus(audioMasterCallback audioMaster) :
D = 1.0;
E = 1.0;
for (int x = 0; x < 9; x++) {figureL[x] = 0.0;figureR[x] = 0.0;}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -34,8 +34,8 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -128,11 +128,11 @@ void Focus::processReplacing(float **inputs, float **outputs, VstInt32 sampleFra
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -39,42 +39,8 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -247,42 +213,8 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -53,7 +53,7 @@ GlitchShifter::GlitchShifter(audioMasterCallback audioMaster) :
C = 0.5;
D = 0.0;
E = 0.5;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -28,8 +28,8 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
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;
@ -307,11 +307,11 @@ void GlitchShifter::processReplacing(float **inputs, float **outputs, VstInt32 s
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -13,7 +13,7 @@ Gringer::Gringer(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
for (int x = 0; x < 9; x++) {inbandL[x] = 0.0; outbandL[x] = 0.0; inbandR[x] = 0.0; outbandR[x] = 0.0;}
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -60,8 +60,8 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
{
double inputSampleL = *in1;
double inputSampleR = *in2;
if (fabs(inputSampleL)<1.18e-37) inputSampleL = fpd * 1.18e-37;
if (fabs(inputSampleR)<1.18e-37) inputSampleR = fpd * 1.18e-37;
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
inputSampleL = sin(inputSampleL);
inputSampleR = sin(inputSampleR);
@ -105,11 +105,11 @@ void Gringer::processReplacing(float **inputs, float **outputs, VstInt32 sampleF
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;

View file

@ -16,7 +16,7 @@ Highpass2::Highpass2(audioMasterCallback audioMaster) :
B = 0.5; //-1.0 to 1.0
C = 0.25; // 0.0 to 4.0
D = 1.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
iirSampleAL = 0.0;
iirSampleBL = 0.0;

View file

@ -41,42 +41,8 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;
@ -160,11 +126,11 @@ void Highpass2::processReplacing(float **inputs, float **outputs, VstInt32 sampl
//begin 32 bit stereo floating point dither
int expon; frexpf((float)inputSampleL, &expon);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleL += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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);
fpd ^= fpd << 13; fpd ^= fpd >> 17; fpd ^= fpd << 5;
inputSampleR += ((double(fpd)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
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;
@ -211,42 +177,8 @@ void Highpass2::processDoubleReplacing(double **inputs, double **outputs, VstInt
double inputSampleL = *in1;
double inputSampleR = *in2;
static int noisesourceL = 0;
static int noisesourceR = 850010;
int residue;
double applyresidue;
noisesourceL = noisesourceL % 1700021; noisesourceL++;
residue = noisesourceL * noisesourceL;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL += applyresidue;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
inputSampleL -= applyresidue;
}
noisesourceR = noisesourceR % 1700021; noisesourceR++;
residue = noisesourceR * noisesourceR;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR += applyresidue;
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
inputSampleR -= applyresidue;
}
//for live air, we always apply the dither noise. Then, if our result is
//effectively digital black, we'll subtract it again. We want a 'air' hiss
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;

View file

@ -36,7 +36,7 @@ Holt::Holt(audioMasterCallback audioMaster) :
previousSampleDR = 0.0;
previousTrendDR = 0.0;
fpd = 17;
fpd = 1.0; while (fpd < 16386) fpd = 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.

View file

@ -56,7 +56,8 @@ private:
char _programName[kVstMaxProgNameLen + 1];
std::set< std::string > _canDo;
uint32_t fpd;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
double previousSampleAL;

Some files were not shown because too many files have changed in this diff Show more