AudioParam class abstract
The Web Audio API's AudioParam
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.
API documentation sourced from MDN Web Docs.
Constructors
Properties
- automationRate ↔ AutomationRate
-
getter/setter pair
- defaultValue → double
-
The
defaultValue
read-only property of the AudioParam represents the initial value of the attributes as defined by the specific AudioNode creating theAudioParam
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- maxValue → double
-
The
maxValue
read-only property of the AudioParam represents the maximum possible value for the parameter's nominal (effective) range.no setter - minValue → double
-
The
minValue
read-only property of the AudioParam represents the minimum possible value for the parameter's nominal (effective) range.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ double
-
The Web Audio
API's
AudioParam property
value
gets or sets the value of this AudioParam at the current time. Initially, the value is set to AudioParam.defaultValue.getter/setter pair
Methods
-
cancelAndHoldAtTime(
TauTime cancelTime) → AudioParam -
The
cancelAndHoldAtTime()
method of the AudioParam cancels all scheduled future changes to theAudioParam
but holds its value at a given time until further changes are made using other methods. -
cancelScheduledValues(
TauTime cancelTime) → AudioParam -
The
cancelScheduledValues()
method of the AudioParam cancels all scheduled future changes to theAudioParam
. -
exponentialRampToValueAtTime(
TauTime value, TauTime endTime) → AudioParam -
The
exponentialRampToValueAtTime()
method of the AudioParam 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 thevalue
parameter, and reaches the new value at the time given in theendTime
parameter. -
linearRampToValueAtTime(
TauTime value, TauTime endTime) → AudioParam -
The
linearRampToValueAtTime()
method of the AudioParam schedules a gradual linear change in the value of theAudioParam
. The change starts at the time specified for the previous event, follows a linear ramp to the new value given in thevalue
parameter, and reaches the new value at the time given in theendTime
parameter. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setTargetAtTime(
num target, TauTime startTime, TauTime timeConstant) → AudioParam -
The
setTargetAtTime()
method of the AudioParam schedules the start of a gradual change to theAudioParam
value. This is useful for decay or release portions of ADSR envelopes. -
setValueAtTime(
TauTime value, TauTime startTime) → AudioParam -
The
setValueAtTime()
method of the AudioParam schedules an instant change to theAudioParam
value at a precise time, as measured against BaseAudioContext.currentTime. The new value is given in the value parameter. -
setValueCurveAtTime(
TauArray< TauNumber> values, TauTime startTime, TauTime duration) → AudioParam -
The
setValueCurveAtTime()
method of the AudioParam 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