High quality Pink Noise generation
Posted: Sat Jul 29, 2017 4:52 pm
Hi guys!
Up to now every time I need some pink noise I pretty much to what the FAUST libraries do: create white noise and filter it through an IIR. From FAUST libraries source code:
I always use the coefficients above for the IIR, also when I implement somthing by myself. So:
Numeartor: (0.049922035, -0.095993537, 0.050612699, -0.004408786)
Denominator: (-2.494956002, 2.017265875, -0.522189400)
However, I found that the output noise is not very pinkish at the very low end: its spectrum becomes flat below a certain frequency. Which isn't a problem, but at work we have a 01dB signal generator program that outputs way pinker noise through the same soundcard I use to test my code (I analysed the audio output with a professional 01dB analyser).
So, I am left wondering: is there a better algorithm to generate very accurate pink noise (apart from using a higher order IIR)? Are you aware of any?
Up to now every time I need some pink noise I pretty much to what the FAUST libraries do: create white noise and filter it through an IIR. From FAUST libraries source code:
Code: Select all
//---------------------------`pink_noise`--------------------------
// Pink noise (1/f noise) generator (third-order approximation)
// `pink_noise` is a standard Faust function.
//
// #### Usage
//
// ```
// pink_noise : _;
// ```
//
// #### Reference:
//
// <https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html>
//------------------------------------------------------------
pink_filter = fi.iir((0.049922035, -0.095993537, 0.050612699, -0.004408786),
(-2.494956002, 2.017265875, -0.522189400));
pink_noise = noise : pink_filter;
Numeartor: (0.049922035, -0.095993537, 0.050612699, -0.004408786)
Denominator: (-2.494956002, 2.017265875, -0.522189400)
However, I found that the output noise is not very pinkish at the very low end: its spectrum becomes flat below a certain frequency. Which isn't a problem, but at work we have a 01dB signal generator program that outputs way pinker noise through the same soundcard I use to test my code (I analysed the audio output with a professional 01dB analyser).
So, I am left wondering: is there a better algorithm to generate very accurate pink noise (apart from using a higher order IIR)? Are you aware of any?