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.

setValueCurveAtTime

Summary

Sets an array of arbitrary parameter values starting at the given time for the given duration. The number of values will be scaled to fit into the desired duration.

Method of apis/webaudio/AudioParamapis/webaudio/AudioParam

Syntax

var  = AudioParam.setValueCurveAtTime(values, startTime, duration);

Parameters

values

Data-type
String

A Float32Array representing a parameter value curve. These values will apply starting at the given time and lasting for the given duration.

startTime

Data-type
Number

The time in the same time coordinate system as AudioContext.currentTime.

duration

Data-type
Number

The amount of time in seconds (after the time parameter) where values will be calculated according to the values parameter.

Return Value

Returns an object of type

Examples

var gainNode = audioCtx.createGain();
gainNode.gain.setValueCurveAtTime(waveArray, audioCtx.currentTime, 2); //'gain' is the AudioParam

Related specifications

W3C Web Audio API
W3C Editor’s Draft