Skip to content
Tone.js

Phaser

class Effect ↳ extends StereoEffect<PhaserOptions>

Phaser is a phaser effect. Phasers work by changing the phase of different frequency components of an incoming signal. Read more on Wikipedia. Inspiration for this phaser comes from Tuna.js.

const phaser = new Tone.Phaser({
	frequency: 15,
	octaves: 5,
	baseFrequency: 1000
}).toDestination();
const synth = new Tone.FMSynth().connect(phaser);
synth.triggerAttackRelease("E3", "2n");
new Phaser(frequency?: Frequency, octaves?: number, baseFrequency?: Frequency)

Parameters

  • frequency Frequency optional

    The speed of the phasing.

  • octaves number optional

    The octaves of the effect.

  • baseFrequency Frequency optional

    The base frequency of the filters.

new Phaser(options?: Partial<PhaserOptions>)

Parameters

read-only

frequency: Signal<"frequency">

the frequency of the effect

read-only ↳ inherited from StereoEffect

input: Gain

The input node or nodes. If the object is a source, it does not have any input and this.input is undefined.

read-only

name: string

The name of the class

Default: "Phaser"

read-only ↳ inherited from StereoEffect

output: CrossFade

The output nodes. If the object is a sink, it does not have any output and this.output is undefined.

read-only

Q: Signal<"positive">

The quality factor of the filters

read-only ↳ inherited from StereoEffect

wet: Signal<"normalRange">

The wet control, i.e. how much of the effected will pass through to the output.

baseFrequency: Frequency

The the base frequency of the filters.

octaves: number

The number of octaves the phase goes above the baseFrequency

dispose(): this

Dispose and disconnect

Returns this

static

getDefaults(): PhaserOptions

Returns all of the default options belonging to the class.

Returns PhaserOptions