This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

AnalyserNode

Summary

This interface represents a node which is able to provide real-time frequency and time-domain analysis information. The audio stream will be passed un-processed from input to output.

Properties

fftSize
The size of the FFT (Fast Fourier Transform) used for frequency-domain analysis. Must be a power of two in the range 32-2048; defaults to 2048.
frequencyBinCount
Half the fftSize (the size of the FFT used for frequency-domain analysis).
maxDecibels
The maximum power value in the scaling range for the FFT analysis data for conversion to unsigned byte values.
minDecibels
The minimum power value in the scaling range for the FFT analysis data for conversion to unsigned byte values. Default is -100.
smoothingTimeConstant
A value from 0 to 1 representing the averaging constant with the last analysis frame. Default is 0.8.

Methods

getByteFrequencyData
Copies the current frequency data into the passed unsigned byte array. If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
getByteTimeDomainData
Copies the current time-domain (waveform) data into the passed unsigned byte array. If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
getFloatFrequencyData
Copies the current frequency data into the passed floating-point array. If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.

Events

No events.

Related specifications

W3C Web Audio API
W3C Editor’s Draft