Effect

Object containing all effect-specific WebAudioAPI functionality.

Members

input

Reference to an AudioNode to which all source AudioNodes should be connected.

name

User-defined name of the Effect.

output

Reference to an AudioNode from which all effect-modified output audio is produced, and which should be connected to all destination AudioNodes.

parameters

List of effect-specific EffectParameters for manipulation in the effectOptions parameter of the update() function.

type

Numeric value corresponding to the EffectType of the Effect.

Methods

currentParameterValues() → {Object}

Retrieves the values for all effect-specific parameters at the current time, with keys as specified by the parameters member of this Effect.

Returns:
Object -

Effect-specific parameter values with keys as returned by parameters

async update(effectOptions, opt updateTime, opt timeConstant) → {Promise.<boolean>}

Updates the parameters of the effect at the specified time.

Note that the updateTime parameter can be omitted to immediately cause the requested changes to take effect.

Parameters:
Name Type Attributes Description
effectOptions Object

Effect-specific options as returned by getAvailableEffectParameters()

updateTime number <optional>

Global API time at which to update the effect

timeConstant number <optional>

Time constant defining an exponential approach to the target

Returns:
Promise.<boolean> -

Whether the effect update was successfully applied