-
Notifications
You must be signed in to change notification settings - Fork 0
signal.NoiseGen.Function.generateSpectralNoise
Christian d'Heureuse edited this page Jun 7, 2026
·
2 revisions
dsp-collection / signal/NoiseGen / generateSpectralNoise
function generateSpectralNoise(specAmplitudes, n): Float64Array;Defined in: signal/NoiseGen.ts:63
Low-level function to generate random noise with a specified amplitude spectrum.
The passed spectral amplitudes are combined with random phases and then transformed by an inverse FFT to produce a time-domain signal.
ArrayLike<number>
An array of spectrum amplitudes (linear scale).
The DC value at specAmplitudes[0] is normally set to 0.
specAmplitudes[i] is the amplitude of FFT bin i, i.e. a sinusoid with period n / i samples.
number
The number of output samples to generate. Even values of n are faster than odd values; powers of 2 are fastest.
Float64Array
The generated noise signal.