TK.Filter

TK.Filter provides the math for calculating a gain from a given frequency for different types of biquad filters.

Properties:
Name Type Attributes Default Description
options.type integer <optional>
"parametric"

The type of the filter, "parametric"|"notch"|"low-shelf"|"high-shelf"|"lowpass"+[n]|"highpass"+[n].

options.freq number <optional>
0

The initial frequency.

options.gain number <optional>
0

The initial gain.

options.q number <optional>
1

The initial Q of the filter.

Mixes In:
Source:

Extends

Methods

freq2gain(frequency) → {number}

Returns the gain for a given frequency

Parameters:
Name Type Description
frequency number

The frequency to calculate the gain for.

Source:
Returns:

gain - The gain at the given frequency.

Type
number

Events

initialized

Is fired when an instance gets initialized.

Source:

reset

Is fired when a filters drawing function is reset.

Source: