How to use the standardized-audio-context.DynamicsCompressorNode function in standardized-audio-context

To help you get started, we’ve selected a few standardized-audio-context examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vitaliy-bobrov / js-rocks / src / app / audio / effects / compressor.ts View on Github external
constructor(
    context: AudioContext,
    model: string,
    protected defaults: CompressorSettings
  ) {
    super(context, model);

    this.levelNode = new GainNode(context);
    this.compressor = new DynamicsCompressorNode(context, {
      knee: 30,
      release: 0.25
    });

    this.processor = [this.compressor, this.levelNode];

    connectNodes(this.processor);
    this.applyDefaults();
  }