EffectBase(audioContext)

Class representing all base-level WebAudioAPI effects

new EffectBase(audioContext)

Called by a concrete effect instance to initialize the inherited EffectBase data structure.

Parameters:
Name Type Description
audioContext AudioContext

Reference to the global browser AudioContext

See:

Classes

EffectBase

Members

audioContext :AudioContext

Methods

currentParameterValues() → {Object}

Returns the value of all effect parameters at the current time.

Returns:
Object -

Effect-specific parameter values with keys as returned by getAvailableEffectParameters()

getInputNode() → {AudioNode}

Returns a reference to the AudioNode to which all source AudioNodes should be connected in order to activate this Effect.

Returns:
AudioNode -

Reference to the first AudioNode in the effect sequencing pipeline

See:

getOutputNode() → {AudioNode}

Returns a reference to the AudioNode from which all effect-modified output audio is produced.

Returns:
AudioNode -

Reference to the final AudioNode in the effect sequencing pipeline

See:

async load()

Loads the necessary data to implement the corresponding Effect, which can then be applied to an individual Track or to the aggregate output of all tracks.

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