AnalyserNode

external class AnalyserNode : AudioNode

Analysis node to retrieve information about the spectrum or wave

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var fftSize: Int
Link copied to clipboard
Link copied to clipboard
var maxDecibels: Double

dB value above which the signal is cut off (for frequency display). Default is -30 dB.

Link copied to clipboard
var minDecibels: Double

dB value below which the signal is cut off (for frequency display). Default is -100 dB.

Link copied to clipboard

The smoothingTimeConstant (0..1) allows smoothing of data between two analyses (values close to 1 => smoother, values close to 0 => more reactive). Default is 0.8.

Functions

Link copied to clipboard
fun connect(destination: AudioNode, output: Int = definedExternally, input: Int = definedExternally): AudioNode
Link copied to clipboard
Link copied to clipboard
fun getByteFrequencyData(array: Uint8Array)

Retrieves the frequency amplitude in a byte array (0..255).

Link copied to clipboard
fun getByteTimeDomainData(array: Uint8Array)

Retrieves the raw waveform (time domain) in a byte array (0..255). By default, 128 represents axis 0, so 0..255 ->-1..+1.

Link copied to clipboard
fun getFloatFrequencyData(array: Float32Array)

Additional methods if needed: retrieval in Float32.

Link copied to clipboard
fun getFloatTimeDomainData(array: Float32Array)