A sound effect which applies a convolver filter. The convolver effect splits the input sound into two separate paths:

  1. A "dry" node which is the original sound
  2. A "wet" node which contains the result of the convolution This effect mixes between the dry and wet channels based on the intensity of the reverb effect.

See

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

Alias

foundry.audio.ConvolverFilterEffect

Hierarchy

  • ConvolverNode
    • ConvolverEffect

Constructors

  • A ConvolverEffect is constructed by passing the following parameters.

    Parameters

    • context: AudioContext

      The audio context required by the ConvolverNode

    • Optional options: {
          impulseResponsePath: string;
          intensity: number;
      } = {}

      Additional options which modify the ConvolverEffect behavior

      • impulseResponsePath: string

        The file path to the impulse response buffer to use

      • intensity: number

        The initial intensity of the effect

    Returns ConvolverEffect

Properties

#impulseResponsePath: string

The identifier of the impulse response buffer currently used. The default impulse response function was generated using https://aldel.com/reverbgen/.

#dryGain: GainNode

A GainNode which mixes base, non-convolved, audio playback into the final result.

#wetGain: GainNode

A GainNode which mixes convolved audio playback into the final result.

#loaded: boolean = false

Flag whether the impulse response buffer has been loaded to prevent duplicate load requests.

#intensity: number

Accessors

  • get intensity(): number
  • Adjust the intensity of the effect on a scale of 0 to 10.

    Returns number

  • set intensity(value): void
  • Parameters

    • value: number

    Returns void

Methods

  • Update the state of the effect node given the active flag and numeric intensity.

    Parameters

    • options: {
          intensity: number;
      } = {}

      Options which are updated

      • intensity: number

        A new effect intensity

    Returns void

  • Parameters

    • Rest ...args: any[]

    Returns void

  • Parameters

    • destinationNode: any
    • Rest ...args: any[]

    Returns any

  • Additional side effects performed when some other AudioNode connects to this one. This behavior is not supported by the base WebAudioAPI but is needed here for more complex effects.

    Parameters

    • sourceNode: AudioNode

      An upstream source node that is connecting to this one

    Returns void