Path: blob/main/files/en-us/web/api/audioparamdescriptor/index.md
6580 views
------{{APIRef("Web Audio API")}}
The AudioParamDescriptor dictionary of the Web Audio API specifies properties for {{domxref("AudioParam")}} objects.
It is used to create custom AudioParams on an {{domxref("AudioWorkletNode")}}. If the underlying {{domxref("AudioWorkletProcessor")}} has a {{domxref("AudioWorkletProcessor.parameterDescriptors", "parameterDescriptors")}} static getter, then the returned array of objects based on this dictionary is used internally by AudioWorkletNode constructor to populate its {{domxref("AudioWorkletNode.parameters", "parameters")}} property accordingly.
Instance properties
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}}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
The code fragment below shows a descriptor of this type being returned by a static {{domxref("AudioWorkletProcessor.parameterDescriptors", "parameterDescriptors")}} method defined in a custom AudioWorkletProcessor (this is part of the more complete example in AudioWorkletNode.parameters).
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}