Skip to content
Tone.js

OnePoleFilter

class Component ↳ extends ToneAudioNode<OnePoleFilterOptions>

A one pole filter with 6db-per-octave rolloff. Either “highpass” or “lowpass”. Note that changing the type or frequency may result in a discontinuity which can sound like a click or pop. References:

new OnePoleFilter(frequency?: Frequency, type?: OnePoleFilterType)

Parameters

  • frequency Frequency optional

    The frequency

  • type OnePoleFilterType optional

    The filter type, either “lowpass” or “highpass”

new OnePoleFilter(options?: Partial<OnePoleFilterOptions>)

Parameters

read-only

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: "OnePoleFilter"

read-only

output: Gain

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

frequency: Frequency

The frequency value.

The OnePole Filter type, either “highpass” or “lowpass”

dispose(): this

Dispose and disconnect

Returns this

getFrequencyResponse(len?: number): Float32Array

Get the frequency response curve. This curve represents how the filter responses to frequencies between 20hz-20khz.

Parameters

  • len number optional default 128

    The number of values to return

Returns Float32Array The frequency response curve between 20-20kHz

static

getDefaults(): OnePoleFilterOptions

Returns all of the default options belonging to the class.

Returns OnePoleFilterOptions