how to create synthetic $1/f$ noise?
this is an old resource, but good.   in fact, i have a very old contribution (another 3 decade old design) that i will repeat here at SE:

A method that Orfanidis (Introduction to Signal Processing mentions came from an old comp.dsp post of mine. (here's a pdf, check Problem B.9)  It's just a simple "pinking" filter to be applied to white noise.  since the rolloff is -3 dB/octave, -6 dB/octave (1st order pole) is too steep and 0 dB/octave is too shallow.

An equiripple approximation to the ideal pinking filter can be realized by
alternating real poles with real zeros.  A simple 3rd order solution that i
obtained is:

$$ H(z) = \frac{(z-q_1)(z-q_2)(z-q_3)}{(z-p_1)(z-p_2)(z-p_3)} $$

where

$p_1$ =  0.99572754

$p_2$ =  0.94790649

$p_3$ =  0.53567505

$q_1$ =  0.98443604

$q_2$ =  0.83392334

$q_3$ =  0.07568359

The response follows the ideal -3 dB/octave curve to within $\pm$0.3 dB error over a 10 octave range from 0.0009$\times \pi$ to 0.9$\times \pi$.  ("Nyquist" = $\pi$.)