In a related question a probable solution was given to build a first-order digital filter and then cascade three of them in order to turn white noise into pink. I have applied the C++ as follows but still the signal sounds and looks like white noise.
I would like to know what is wrong with my implementation and why I don't hear pink noise. For reference, the poles and zeros come from Robert Bristow-Johnson's work here.
float *state = nullptr;
state = new float[0.0]; in Constructor.
Then in the loop,
for (int i=0; i < numSamples; i++)
float first = first_order_filter(whiteNoise, 0.99572754, 0.98443604, state); float second = first_order_filter(first, 0.94790649, 0.83392334, state); float third = first_order_filter(second, 0.53567505, 0.07568359, state); out1 = third;
Where first_order_filter is defined as in Robert's answer here:
I would love to know if this code is approximately correct/ where the problem lies.