Skip to content

AudioWorklet guide does not document parameter automationRate default and configuration #42584

@limonatasuyu

Description

@limonatasuyu

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_AudioWorklet

What specific section or headline is this issue about?

Adding parameter support to the processor

What information was incorrect, unhelpful, or incomplete?

The guide explains the difference between a-rate and k-rate parameters, but it does not document the default automation rate for AudioWorklet parameters or how developers specify whether a parameter should be a-rate or k-rate. This omission leaves it unclear how the behavior described in the examples is selected or controlled when implementing AudioWorkletProcessor.

What did you expect to see?

The guide should explicitly mention that:

automationRate defaults to "a-rate" when omitted, "k-rate" must be explicitly requested in the parameter descriptor

Example:

static get parameterDescriptors() {
  return [
    {
      name: "gain",
      defaultValue: 0.5,
      minValue: 0,
      maxValue: 1,
      automationRate: "k-rate",
    }
  ];
}

Without this clarification, developers may incorrectly assume sample-accurate behavior by default.

Do you have any supporting links, references, or citations?

The default behavior and configuration of automationRate are documented here, but are not mentioned in this guide:
https://developer.mozilla.org/en-US/docs/Web/API/AudioParamDescriptor

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:WebAPIWeb API docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions