I learnt from here that the following filter can turn white noise into pink (-3dB/ octave).
b0 = 0.99765 * b0 + white * 0.0990460; b1 = 0.96300 * b1 + white * 0.2965164; b2 = 0.57000 * b2 + white * 1.0526913; pink = b0 + b1 + b2 + white * 0.1848;
How would I turn white noise into blue/ azure noise (+3dB/ octave)? Is it possible to do some simple 'inversion' on this filter or can you please give me a tip as to how I can calculate the filter coefficients.
I probably should have mentioned that I need a C++ implementation but Robert's 2nd answer has me close.
Right now I do this in the header:
float *state = nullptr;
The in the implementation file:
state = new float[0.0]; in the constructor then inside the actual loop I take my white noise and do this:
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;
I am expecting pink noise as I have not yet swapped the Poles and Zeros (if I had then I would expect blue/ azure noise) but currently I get what looks and sounds like white noise.