exponentialRampToValueAtTime
Summary
Schedules an exponential continuous change in parameter value from the previous scheduled parameter value to the given value. Parameters representing filter frequencies and playback rate are best changed exponentially because of the way humans perceive sound.
Method of apis/webaudio/AudioParamapis/webaudio/AudioParam
Syntax
var = AudioParam.exponentialRampToValueAtTime(value, endTime);
Parameters
value
- Data-type
- Number
The value the parameter will exponentially ramp to at the given time. An exception will be thrown if this value is less than or equal to 0, or if the value at the time of the previous event is less than or equal to 0.
endTime
- 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.exponentialRampToValueAtTime(1.0, audioCtx.currentTime + 2); //'gain' is the AudioParam
Related specifications
- W3C Web Audio API
- W3C Editor’s Draft