PokéRogue
    Preparing search index...

    Interface DynamicsCompressorNode

    The DynamicsCompressorNode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once.

    MDN Reference

    interface DynamicsCompressorNode {
        attack: AudioParam;
        channelCount: number;
        channelCountMode: ChannelCountMode;
        channelInterpretation: ChannelInterpretation;
        context: BaseAudioContext;
        knee: AudioParam;
        numberOfInputs: number;
        numberOfOutputs: number;
        ratio: AudioParam;
        reduction: number;
        release: AudioParam;
        threshold: AudioParam;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        connect(
            destinationNode: AudioNode,
            output?: number,
            input?: number,
        ): AudioNode;
        connect(destinationParam: AudioParam, output?: number): void;
        disconnect(): void;
        disconnect(output: number): void;
        disconnect(destinationNode: AudioNode): void;
        disconnect(destinationNode: AudioNode, output: number): void;
        disconnect(destinationNode: AudioNode, output: number, input: number): void;
        disconnect(destinationParam: AudioParam): void;
        disconnect(destinationParam: AudioParam, output: number): void;
        dispatchEvent(event: Event): boolean;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    attack: AudioParam

    The attack property of the DynamicsCompressorNode interface is a k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB.

    MDN Reference

    channelCount: number

    The channelCount property of the AudioNode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.

    MDN Reference

    channelCountMode: ChannelCountMode

    The channelCountMode property of the AudioNode interface represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.

    MDN Reference

    channelInterpretation: ChannelInterpretation

    The channelInterpretation property of the AudioNode interface represents an enumerated value describing how input channels are mapped to output channels when the number of inputs/outputs is different.

    MDN Reference

    The read-only context property of the the node is participating in.

    MDN Reference

    The knee property of the DynamicsCompressorNode interface is a k-rate AudioParam containing a decibel value representing the range above the threshold where the curve smoothly transitions to the compressed portion.

    MDN Reference

    numberOfInputs: number

    The numberOfInputs property of the AudioNode interface returns the number of inputs feeding the node.

    MDN Reference

    numberOfOutputs: number

    The numberOfOutputs property of the AudioNode interface returns the number of outputs coming out of the node.

    MDN Reference

    ratio: AudioParam

    The ratio property of the DynamicsCompressorNode interface Is a k-rate AudioParam representing the amount of change, in dB, needed in the input for a 1 dB change in the output.

    MDN Reference

    reduction: number

    The reduction read-only property of the DynamicsCompressorNode interface is a float representing the amount of gain reduction currently applied by the compressor to the signal.

    MDN Reference

    release: AudioParam

    The release property of the DynamicsCompressorNode interface Is a k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB.

    MDN Reference

    threshold: AudioParam

    The threshold property of the DynamicsCompressorNode interface is a k-rate AudioParam representing the decibel value above which the compression will start taking effect.

    MDN Reference

    Methods

    • The connect() method of the AudioNode interface lets you connect one of the node's outputs to a target, which may be either another AudioNode (thereby directing the sound data to the specified node) or an change the value of that parameter over time.

      MDN Reference

      Parameters

      • destinationNode: AudioNode
      • Optionaloutput: number
      • Optionalinput: number

      Returns AudioNode

    • Parameters

      • destinationParam: AudioParam
      • Optionaloutput: number

      Returns void

    • The disconnect() method of the AudioNode interface lets you disconnect one or more nodes from the node on which the method is called.

      MDN Reference

      Returns void

    • Parameters

      • output: number

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Parameters

      • destinationNode: AudioNode
      • output: number
      • input: number

      Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      Returns void