AudioWorkletProcessor: parameterDescriptors static property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Web Audio API")}}
The **parameterDescriptors** static property of an {{domxref("AudioWorkletProcessor")}}-derived class is an iterable of {{domxref("AudioParamDescriptor")}}-based objects.
The property is not a part of the {{domxref("AudioWorkletProcessor")}} interface, but, if defined, it is read by {{domxref("AudioWorkletGlobalScope.registerProcessor", "registerProcessor()")}} to create a list of custom {{domxref("AudioParam")}} objects in the {{domxref("AudioWorkletNode.parameters", "parameters")}} property of the associated {{domxref("AudioWorkletNode")}}. It is never modified by built-in APIs, so it may be defined as a _static getter_.
Defining the property is optional.
Value
An iterable of {{domxref("AudioParamDescriptor")}}-based objects. The properties of these objects are as follows:
name- : The string which represents the name of the
AudioParam. Under this name theAudioParamwill be available in the {{domxref("AudioWorkletNode.parameters", "parameters")}} property of the node, and under this name the {{domxref("AudioWorkletProcessor.process")}} method will acquire the calculated values of thisAudioParam. automationRate{{optional_inline}}- : Either [
"a-rate"](/en-US/docs/Web/API/AudioParam#a-rate), or ["k-rate"](/en-US/docs/Web/API/AudioParam#k-rate) string which represents an automation rate of thisAudioParam. Defaults to"a-rate". minValue{{optional_inline}}- : A
floatwhich represents minimum value of theAudioParam. Defaults to-3.4028235e38. maxValue{{optional_inline}}- : A
floatwhich represents maximum value of theAudioParam. Defaults to3.4028235e38. defaultValue{{optional_inline}}- : A
floatwhich represents initial value of theAudioParam. Defaults to0.
Examples
See [AudioWorkletNode.parameters](/en-US/docs/Web/API/AudioWorkletNode/parameters#examples) for example code showing how to add static parameterDescriptors getter to a custom AudioWorkletProcessor.
Specifications
{{Specifications}}
See also
- Web Audio API
- Using the Web Audio API