So im trying to create a simple brownian or red noise for a synth. This is how i create white noise:
float r = rand()/(float)RAND_MAX; output=r*2-1; return(output);
Now to create a simple brownian noise i thought i could use the last value of the white noise, add it with the new value and then take its average. Like this:
float r1 = rand()/(float)RAND_MAX; float newOutput = r1*2 -1; output = (oldOutput + newOutput) * 0.5; oldOutput = newOutput; return(output);
So when i print this, i do get smoother transitions between the output numbers. This however has no effect on the audio, which still sounds like completely random white noise. Could someone explain this to me?
Thanks so much, its probably very obvious but im a bit stuck on it