Noise frequency range

Help for Audacity on Windows.
Forum rules
ImageThis 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.
Post Reply
Rick_123
Posts: 11
Joined: Wed Dec 02, 2020 10:01 am
Operating System: Windows 10

Noise frequency range

Post by Rick_123 » Wed Dec 02, 2020 10:09 am

Hi,
new to this forum so hopefully I am posting on the right thread.

I need to generate white noise between two arbitrary frequencies.

Few questions:
1) Between which frequencies does Audacity generate the white noise?
2) The Audacity plugin does not seem to allow choosing the min and max frequency. Are there any plugins that do that?

I am running the latest Audacity 2.4.2 on Win 10 (updated a couple of days ago)

Thank you
Rick

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise frequency range

Post by steve » Wed Dec 02, 2020 11:30 am

Rick_123 wrote:
Wed Dec 02, 2020 10:09 am
1) Between which frequencies does Audacity generate the white noise?
The upper frequency limit is half the sample rate (the "Nyquist frequency")
The lower frequency limit is not bound (not limited). If three consecutive samples have the same value (unlikely but possible because they are random), then that could be described as a very short period of 0 Hz.
Rick_123 wrote:
Wed Dec 02, 2020 10:09 am
2) The Audacity plugin does not seem to allow choosing the min and max frequency. Are there any plugins that do that?
You can limit the bandwidth by filtering, for example with the Filter Curve EQ
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Rick_123
Posts: 11
Joined: Wed Dec 02, 2020 10:01 am
Operating System: Windows 10

Re: Noise frequency range

Post by Rick_123 » Wed Dec 02, 2020 11:51 am

Thank you Steve,

I need to implement white noise ideally up to 193KHz for testing application (not only for audio).

I know about the Nyquist freq, but how do I set the sample rate in Audacity?

Ref the lowest noise frequency, I understand what you are suggesting but there must be a specific value that mathematically Audacity generates regardless of the three samples case you mention. Unless I am missing something?

Thank you :)

DVDdoug
Forum Crew
Posts: 9287
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: Noise frequency range

Post by DVDdoug » Wed Dec 02, 2020 3:28 pm

how do I set the sample rate in Audacity?
"Project Rate" in the lower-left of the Audacity window.

kozikowski
Forum Staff
Posts: 68941
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Noise frequency range

Post by kozikowski » Wed Dec 02, 2020 4:19 pm

There is a caution here. Audacity regularly burns scientists because if it's a toss-up between perfect, (apparent) scientific accuracy and sounding good. Audacity will always opt for sounding good.

For good, predictable accuracy, you are advised to say away from the Nyquist sampling limit. Approaching the limit can cause some frequencies to dominate others, or worse, create unpredictable actions.

If you opt for creating a perfect quality WAV file with your work on it, you should know that Audacity, unless you stop it, adds shaped dither noise to the work to keep the conversion from 32-bit floating (Audacity Internal) to 16 bit errors from lining up. If you don't put the dither signal in, the errors will line up.

Bandpass filters have their own oddities. Everybody loves "brick wall filters" (beyond here you shall not pass!) but severe filters do messy things to the passband and the work in the middle. Look up the difference between Chebyshev (messy, sharp) and Butterworth (gentle, sloppy) filters.

Screen Shot 2020-12-02 at 8.13.51 AM.png
Screen Shot 2020-12-02 at 8.13.51 AM.png (13.36 KiB) Viewed 132 times

Good luck.

Koz

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise frequency range

Post by steve » Wed Dec 02, 2020 4:58 pm

Rick_123 wrote:
Wed Dec 02, 2020 11:51 am
there must be a specific value that mathematically Audacity generates
Like most digital white noise generators, Audacity generates white noise by producing audio samples with random values between +/- 1.
See also: https://en.wikipedia.org/wiki/White_noise
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

DVDdoug
Forum Crew
Posts: 9287
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: Noise frequency range

Post by DVDdoug » Wed Dec 02, 2020 5:03 pm

Ref the lowest noise frequency, I understand what you are suggesting but there must be a specific value that mathematically Audacity generates regardless of the three samples case you mention. Unless I am missing something?
White noise is random (but quantized) so any frequency has an equal probability including DC (zero Hz). And the probability of any single frequency for any period of time is essentially zero...

It should be possible (and probably more useful) to calculate the probability of a range of frequencies (maybe 0-1Hz or 0-10Hz if you're interested in very-low frequencies).

But there is a fairly high probability of some DC component over any period of time. i.e. The positive & negative samples are unlikely to sum-to exactly zero.

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Noise frequency range

Post by steve » Wed Dec 02, 2020 5:04 pm

kozikowski wrote:
Wed Dec 02, 2020 4:19 pm
Everybody loves "brick wall filters" (beyond here you shall not pass!) but severe filters do messy things to the passband and the work in the middle. Look up the difference between Chebyshev (messy, sharp) and Butterworth (gentle, sloppy) filters.
but some modern digital filters can get pretty close to "ideal" brick wall. For example, this is low-pass filtered with Audacity's "Spectral Delete" effect:

filtered.png
filtered.png (48.97 KiB) Viewed 126 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

kozikowski
Forum Staff
Posts: 68941
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Noise frequency range

Post by kozikowski » Wed Dec 02, 2020 5:59 pm

I need to implement white noise ideally up to 193KHz for testing application (not only for audio).
Remember that? There are radio transmitters running at that frequency and we still have to get the work out of the computer and into the test. Further, for good stable digital accuracy, you could need a sampling frequency as high as 500KHz. You can't depend on limits of human hearing to glide you over errors and inaccuracies. "It sounds fine, don't worry about it." doesn't work at those rates.

Koz

Post Reply