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.

getFloatFrequencyData

Summary

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.

Method of apis/webaudio/AnalyserNodeapis/webaudio/AnalyserNode

Syntax

var  = AnalyserNode.getFloatFrequencyData(array);

Parameters

array

Data-type
void

Where frequency-domain analysis data will be copied.

Return Value

Returns an object of type

Float32Array

Examples

var audioCtx = new AudioContext();
var analyser = audioCtx.createAnalyser();
// Float32Array should be the same length as the frequencyBinCount
var myDataArray = new Float32Array(analyser.frequencyBinCount);
// fill the Float32Array with data returned from getFloatFrequencyData()
analyser.getFloatFrequencyData(myDataArray);

Related specifications

Web Audio API
W3C Editor’s Draft