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.

setValueAtTime

Summary

Schedules a parameter value change at the given time.

Method of apis/webaudio/AudioParamapis/webaudio/AudioParam

Syntax

var  = AudioParam.setValueAtTime(value, startTime);

Parameters

value

Data-type
Number

The value the parameter will change to at the given time.

startTime

Data-type
Number

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

Return Value

Returns an object of type

Examples

var gainNode = audioCtx.createGain();
gainNode.gain.setValueAtTime(0.25, audioCtx.currentTime + 1); //'gain' is the AudioParam

Related specifications

W3C Web Audio API
W3C Editor’s Draft