top of page

Master the Art of Pink Noise Generation with these Simple Algorithms

May 17, 2024

Pink noise, also known as 1/f noise or flicker noise, is a distinct type of noise that has a frequency spectrum inversely proportional to its frequency. This causes the energy density to be evenly distributed across octaves, resulting in a soothing sound that's widely used in various applications, such as audio testing, sleep aids, and background noise. In this article, we will discuss how to generate pink noise algorithmically using various methods.



  1. Filtered White Noise Algorithm:
    One common way to generate pink noise is by applying a filter to white noise. White noise has equal energy at all frequencies, making it an ideal candidate for conversion. The filter will attenuate higher frequencies, allowing lower ones to dominate. Here's a simple process:
    a. Generate white noise using a random number generator.
    b. Apply a low-pass filter to the white noise signal.
    c. Normalize the output to have the desired amplitude range.



  2. Voss-McCartney Algorithm:
    This pink noise generation algorithm, developed by Richard F. Voss and John F. McCartney, uses an iterative process called recursive addition to create an output signal. The basic idea is to add together several independent sequences of white noise, with each sequence having its own distinct time scale:
    a. Generate an array of white noise sources, each with a different time scale.
    b. Sum the values of the white noise sources at each time step to create the pink noise signal.
    c. Normalize the output to have the desired amplitude range.



  3. FFT Algorithm:




Fast Fourier Transform (FFT) can be utilized to generate pink noise by adjusting the frequency spectrum directly:
a. Generate random complex numbers for each frequency component.
b. Apply the 1/f scaling to the amplitudes of the frequency components.
c. Perform an inverse FFT to convert the frequency domain representation back into a time domain signal.
d. Normalize the output to have the desired amplitude range.


Regardless of the pink noise generation method chosen, it's essential to test the output to ensure that it meets your specific requirements. Utilize spectrum-analysis tools to verify that the generated signal exhibits the desired pink noise characteristics. By thoroughly understanding and employing these algorithms, you can successfully create pink noise for your project or application.


bottom of page