AudioWorkletProcessor: parameterDescriptors property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The read-only parameterDescriptors
property of an AudioWorkletProcessor
-derived class is a static getter,
which returns an iterable of AudioParamDescriptor
-based objects.
The property is not a part of the AudioWorkletProcessor
interface, but, if defined, it is called internally by the
AudioWorkletProcessor
constructor to create a list of custom
AudioParam
objects in the parameters
property of the associated AudioWorkletNode
.
Defining the getter is optional.
Value
An iterable of AudioParamDescriptor
-based objects. The properties of
these objects are as follows:
name
-
The string which represents the name of the
AudioParam
. Under this name theAudioParam
will be available in theparameters
property of the node, and under this name theAudioWorkletProcessor.process
method will acquire the calculated values of thisAudioParam
. automationRate
Optional-
Either
"a-rate"
, or"k-rate"
string which represents an automation rate of thisAudioParam
. Defaults to"a-rate"
. minValue
Optional-
A
float
which represents minimum value of theAudioParam
. Defaults to-3.4028235e38
. maxValue
Optional-
A
float
which represents maximum value of theAudioParam
. Defaults to3.4028235e38
. defaultValue
Optional-
A
float
which represents initial value of theAudioParam
. Defaults to0
.
Examples
See AudioWorkletNode.parameters
for example code showing how to add static parameterDescriptors
getter to a custom AudioWorkletProcessor
.
Specifications
Specification |
---|
Web Audio API # audioworkletprocess-callback-parameters |