Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
WhiteNoise Class Reference

White noise generator using a normal distribution. More...

#include <gin_noise.h>

Public Member Functions

 WhiteNoise ()
 
float nextSample ()
 

Detailed Description

White noise generator using a normal distribution.

WhiteNoise produces random samples with a flat frequency spectrum (equal power across all frequencies). Uses C++ standard library's normal distribution with mean 0.0 and standard deviation 0.1.

White noise characteristics:

Usage:

WhiteNoise noise;
// In audio processing loop
for (int i = 0; i < numSamples; ++i)
{
float sample = noise.nextSample();
audioBuffer[i] = sample;
}
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
White noise generator using a normal distribution.
Definition gin_noise.h:48
float nextSample()
Definition gin_noise.h:56

Note: Each instance is seeded with a random device, ensuring different sequences across instances.

See also
PinkNoise

Constructor & Destructor Documentation

◆ WhiteNoise()

WhiteNoise::WhiteNoise ( )

Member Function Documentation

◆ nextSample()

float WhiteNoise::nextSample ( )

The documentation for this class was generated from the following file: