Phaser()

Class representing a Phaser effect.

A Phaser effect manipulates an audio signal by generating high-pass filters in the form of peaks in the frequency spectrum which are used to create cuts in the high-frequency ranges of the original audio signal and modulate them up and down throughout the audio. This effect is frequently used in funk music, and it adds character to individual notes to create a form of swirling movement in the audio.

new Phaser()

Constructs a new Phaser effect object.

Extends

Classes

Phaser

Members

audioContext :AudioContext

Overrides:

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()

Overrides:

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

Overrides:
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

Overrides:
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.

Overrides:

async update(rate, shape, frequency, feedback, intensity, opt updateTime, opt timeConstant) → {Promise.<boolean>}

Updates the Phaser effect according to the specified parameters 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
rate number

Frequency at which an oscillator modulates the phaser signal in Hertz between [0, 10]

shape string

Waveform shape used to modulate the phaser signal from ['sine', 'square', 'sawtooth', 'triangle']

frequency number

Starting frequency of the all-pass filter between [1, 22050]

feedback number

Percentage of processed signal to be fed back into the phaser circuit between [0, 0.95]

intensity number

Ratio of processed-to-original sound as a percentage between [0, 1]

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

Overrides:

static getParameters() → {Array.<EffectParameter>}

Returns a list of all available parameters for manipulation in the effectOptions parameter of the update() function for this Effect.

Returns:
Array.<EffectParameter> -

List of effect-specific parameters for use in the effect's update() function

See: