Noise Generator

White-noise configuration with customizable uniform spectrum

This example demonstrates how to generate and play white noise using the Noise node as the source. This type of signal, characterized by a uniform energy distribution across the entire frequency spectrum, is ideal for acoustic testing or sound design.

// Configure the graph for rendering
let context = Assembler(rendering: .live).createAudioGraph()

// Configure a white-noise audio source
let source = Noise()
source.shape = .flatWhite

// Configure node connections
try context.connect(source: source, to: context.destination)
noise.play(after: 0)

The following video shows the sample code in action and its real-time processing.

circle-info

For a complete description of each class, method, and property referenced in this section, refer to the official API documentationarrow-up-right, where you will find detailed references, available components, parameters, and additional usage code examples.

Last updated