AudioParam extension type

The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain).

An AudioParam can be set to a specific value or a change in value, and can be scheduled to happen at a specific time and following a specific pattern.

Each AudioParam has a list of events, initially empty, that define when and how values change. When this list is not empty, changes using the AudioParam.value attributes are ignored. This list of events allows us to schedule changes that have to happen at very precise times, using arbitrary timeline-based automation curves. The time used is the one defined in BaseAudioContext/currentTime.

on
Implemented types

Properties

automationRate AutomationRate
getter/setter pair
defaultValue num
no setter
hashCode int
The hash code for this object.
no setterinherited
maxValue num
no setter
minValue num
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value num
getter/setter pair

Methods

cancelAndHoldAtTime(num cancelTime) AudioParam
The cancelAndHoldAtTime() method of the AudioParam interface cancels all scheduled future changes to the AudioParam but holds its value at a given time until further changes are made using other methods.
cancelScheduledValues(num cancelTime) AudioParam
The cancelScheduledValues() method of the AudioParam Interface cancels all scheduled future changes to the AudioParam.
exponentialRampToValueAtTime(num value, num endTime) AudioParam
The exponentialRampToValueAtTime() method of the AudioParam Interface schedules a gradual exponential change in the value of the AudioParam. The change starts at the time specified for the previous event, follows an exponential ramp to the new value given in the value parameter, and reaches the new value at the time given in the endTime parameter.
linearRampToValueAtTime(num value, num endTime) AudioParam
The linearRampToValueAtTime() method of the AudioParam Interface schedules a gradual linear change in the value of the AudioParam. The change starts at the time specified for the previous event, follows a linear ramp to the new value given in the value parameter, and reaches the new value at the time given in the endTime parameter.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setTargetAtTime(num target, num startTime, num timeConstant) AudioParam
The setTargetAtTime() method of the AudioParam interface schedules the start of a gradual change to the AudioParam value. This is useful for decay or release portions of ADSR envelopes.
setValueAtTime(num value, num startTime) AudioParam
The setValueAtTime() method of the AudioParam interface schedules an instant change to the AudioParam value at a precise time, as measured against BaseAudioContext/currentTime. The new value is given in the value parameter.
setValueCurveAtTime(JSArray<JSNumber> values, num startTime, num duration) AudioParam
The setValueCurveAtTime() method of the AudioParam interface schedules the parameter's value to change following a curve defined by a list of values.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited