Skip to content

Add adjustable makeup gain to DynamicsCompressorNode #2639

@mjwilson-google

Description

@mjwilson-google

Describe the feature
The DynamicsCompressorNode specification currently has a fixed makeup gain derived from its other parameters: https://webaudio.github.io/web-audio-api/#computing-the-makeup-gain

While automatic makeup gain is convenient in some use cases, some users of the Web Audio API want more control over the makeup gain. For instance see discussions here:

We could add a way for developers to control the makeup gain behavior.

Is there a prototype?
No.

Describe the feature in more detail
I propose allowing users to control makeup gain directly in DynamicsCompressorNode by adding the following:

  • An AudioParam, makeupGain, which represents the makeup gain value in dB
  • An addition to DynamicsCompressorOptions, makeupGain, of type (float or MakeupGainOptions), where MakeupGainOptions can be an enum with the value "automatic"
    • If makupGain is "automatic", the default, then the current behavior in the spec is used
    • If makeupGain is a float, then that is the fixed makeup gain in dB (with 0 meaning no makeup gain)

I think the basic idea of the above would work well, but we can also change the details or discuss alternative approaches.

Metadata

Metadata

Labels

Needs EditsDecision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/Priority: Eventually"nice to have". https://speced.github.io/spec-maintenance/about/category: new featureSubstantive changes that add new functionality. https://www.w3.org/policies/process/#class-4size: SSmall amount of work expected to resolve.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions