i just modified the again.dll (my first succesful sound woot(thanks to everyone that helped))
the only things that are different is this function at the top of the again.cpp:
Code: Select all
#include <time.h>
#define RANDoMAX int(0xFFFFFFFF*0.5f)
float GenerateRandomNumber( void )
{
/* Change this for different random sequences. */
static unsigned long randSeed = time(NULL);
randSeed = (randSeed * 196314165) + 907633515;
return float(randSeed);
} Code: Select all
//-----------------------------------------------------------------------------------------
void AGain::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
while (--sampleFrames >= 0)
{
fGain = GenerateRandomNumber()/float(RANDoMAX);
fGain -= 1.0f;
(*out1++) = (*in1++) * fGain;
(*out2++) = (*in2++) * fGain;
}
}
//-----------------------------------------------------------------------------------------
void AGain::processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double dGain = fGain;
while (--sampleFrames >= 0)
{
fGain = GenerateRandomNumber()/float(RANDoMAX);
fGain -= 1.0f;
(*out1++) = (*in1++) * dGain;
(*out2++) = (*in2++) * dGain;
}
}also. again no longer works as a gain plugin. just outputs white noise.
