October 19, 2024

Why White Noise has huge demands on Youtube?

A video on YouTube featuring a completely black screen with white noise static has garnered nearly 200 million views. At first glance, it appears to be a cryptic video with no apparent meaning, but do you happen to know why this kind of phenomenon is happening?

It is quite useful for people who have babies.

Putting a baby to sleep can be an incredibly challenging task for parents. They often cry seemingly without any apparent reason, and it can feel like nothing else can be done while they are crying. However, I’ve heard a useful tip. White noise is said to be a comforting and effective way to soothe a child and guide them to sleep. Stories of babies falling asleep to sounds similar to white noise, like the static noise from a television, are quite common.

The definition of White Noise

White noise is a random signal or sound that has a constant power spectral density across all frequencies. In other words, it contains equal intensity of all frequencies within a specified range, and each frequency component is statistically independent of the others. White noise is often described as having a flat frequency response, meaning that it has the same amount of energy at every frequency.

White noise is used in various applications, including audio engineering, signal processing, and scientific research. It serves as a reference signal, a source of randomness, or a way to mask or drown out unwanted sounds.

Due to its well-defined mathematical properties, it can be created very easily through programming.

Here shows how to do that.

Code

import numpy as np
import scipy.fftpack as fft


def get_whitenoise(
    sampling_rate: int = 44100,
    duration_sec: int = 600
):
    num_samples = int(sampling_rate*duration_sec)

    random_phase = np.exp(
        1j* np.random.uniform(0, 2*np.pi, num_samples)
    )
    # white_noise = fft.ifft(spectrum)
    white_noise = np.real(
        fft.ifft(random_phase)
    )
    
    return white_noise

Here is generated White-Noise from above code