How is noise generated?
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
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.
-
kozikowski
- Forum Staff
- Posts: 69374
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: How is noise generated?
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
The question is what happens at the extreme upper end where the tone generations runs into Nyquist limits.
Koz
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: How is noise generated?
I already know that. But the question is how the noise is generated, and not what properties the generated noise has.
Re: How is noise generated?
Digital audio 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.
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: How is noise generated?
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.
Re: How is noise generated?
https://en.wikipedia.org/wiki/White_noisewhite 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/bl ... /Noise.cpp
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: How is noise generated?
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 noisesteve wrote:https://en.wikipedia.org/wiki/White_noisewhite 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/bl ... /Noise.cpp
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
Re: How is noise generated?
No, that is nonsense. I'd suggest that you learn about acoustics and signal processing before telling others of your uniformed opinions.
This article is Wikipedia is a reasonable place to start: https://en.wikipedia.org/wiki/White_noise
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
This article is Wikipedia is a reasonable place to start: https://en.wikipedia.org/wiki/White_noise
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
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: How is noise generated?
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.steve wrote:No, that is nonsense. I'd suggest that you learn about acoustics and signal processing before telling others of your uniformed opinions.
This article is Wikipedia is a reasonable place to start: https://en.wikipedia.org/wiki/White_noise
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
Re: How is noise generated?
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).A sequence of random numbers?! That seems like an awful way to generate white noise.
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.Suppose that by chance, this noise function generates a song.
Some people do "hear voices" buried in white noise (or pink noise) but this is psychological (or some people think it's paranormal
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.