# How is noise generated?

I’m curious how noise is generated. My guess is that noise of length x seconds is generated by adding up sine waves in increments of 1÷x and random phases, then normalized to the desired volume, and that pink and brown noise is made by varying the volume of the sine waves.

White is equal energy per frequency. Pink is equal energy per octave. I’m not sure what brown is.

The question is what happens at the extreme upper end where the tone generations runs into Nyquist limits.

Koz

I already know that. But the question is how the noise is generated, and not what properties the generated noise has.

[u]Digital audio[/u] is a sequence of numbers (samples) and white noise is just a series of random numbers. You can filter it to get pink noise, etc.

A sequence of random numbers?! That seems like an awful way to generate white noise. Suppose that by chance, this noise function generates a song. This is definitely not a uniform white noise.

white noise is a discrete signal whose samples are regarded as a sequence of serially uncorrelated random variables with zero mean and finite variance

To put that into layman’s terms, it’s a series of random sample values.
For a detailed understanding, see the code: https://github.com/audacity/audacity/blob/master/src/effects/Noise.cpp

As I said, independent random samples generate an awful white noise. A proper whitenoise generation would go like this, where x is the number of seconds of the noise

generate a new floating point sine wave of 1÷x Hz–frequency, x seconds
generate a new floating point sine wave of 2÷x Hz–frequency, x seconds
generate a new floating point sine wave of 3÷x Hz–frequency, x seconds

generate a new floating point sine wave of (floor(Nyquist×x))÷x, x seconds
execute the feature called “Mix” “and” “Render”
execute the feature called “Normalize…”
convert to 16-bit PCM, 24-bit PCM or float depending on userpreference

For pink noise and brown noise, adjust the volume of higher frequencies

No, that is nonsense. I’d suggest that you learn about acoustics and signal processing before telling others of your uniformed opinions.
For a more advanced article, there is this article available from the Audio Engineering Society library for \$33: http://www.aes.org/e-lib/browse.cfm?elib=668

What do you mean by “the nonsense”? White noise is supposed to have equal volume per a fixed linear-size frequency band. Generating a random sound is very dangerous; there is a 1 in 10¹⁰⁰⁰⁰⁰ chance that it’s possible to hear the The Mine Song song in a one minute 6000Hz noise generated by randomness; a hearable song in a generated noise is definitely a sign of a non-uniform white noise.

A sequence of random numbers?! That seems like an awful way to generate white noise.

Think about the reverse… If you digitize analog white noise you’ll get a sequence of random sample values (constrained in amplitude by the format/bit-depth).

Suppose that by chance, this noise function generates a song.

And a monkey at a typewriter might write The Bible (or just a short story)… Or you might paint the Mona Lisa by throwing paint at the wall. In the real world it doesn’t happen… Randomness/chaos is usually obvious and computer-generated (pseudo) randomness sounds like white noise.

Some people do “hear voices” buried in white noise (or pink noise) but this is psychological (or some people think it’s paranormal ). You NEVER get a “clear sounding” voice or a clear sounding tone/song, etc.

P.S.
If you import an MP3 into Audacity as “Raw Data” it’s obviously not random but without proper MP3 decoding it’s disorganized/chaotic and it sounds like white noise. The same thing will happen with almost any non-audio file.

What is an analog white noise? Does it mean white noise generated by combining sines?

In my opinion trying to generate white noise by generating a random sound, is like trying to generate a gray image by generating a random image. It usually looks gray in distance, but there is a chance it’s a photograph. Combining gray at each pixel location is the right way to generate a gray image, and combining sines is the right way to generate white noise.

One of the most common ways to generate “analogue white noise” is to reverse bias a transistor. Other methods include using saturated emission vacuum tube diodes, thermal resistors or reverse biased diodes. The main benefit of analogue circuit noise generators is that they can be extremely simple to make, but the down side is that the “colour” of the noise can be highly dependent on natural variability of components, and temperature dependent. Digital (software) generated noise will generally give a much better degree of “whiteness” (average frequency distribution) and is independent of external factors such as temperature, air pressure etc.

No, that does not produce white noise. If the phases of the sine waves are random, then you create “periodic random noise”, but unlike “white noise”, periodic random noise does not have all frequencies.

There’s a good article about different types of noise here: Dynamic Signal Acquisition Fundamentals - NI
On that note I shall close this topic as it is beyond the scope of this forum.