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:
Constructor
Section titled “Constructor”new OnePoleFilter(frequency?: Frequency, type?: OnePoleFilterType)Parameters
-
frequency
FrequencyoptionalThe frequency
-
type
OnePoleFilterTypeoptionalThe filter type, either “lowpass” or “highpass”
new OnePoleFilter(options?: Partial<OnePoleFilterOptions>)Parameters
- options
Partial<OnePoleFilterOptions>optional
Properties
Section titled “Properties”read-only
input: GainThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”read-only
output: GainThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
type: OnePoleFilterTypeThe OnePole Filter type, either “highpass” or “lowpass”
Methods
Section titled “Methods”getFrequencyResponse()
Section titled “getFrequencyResponse()”getFrequencyResponse(len?: number): Float32ArrayGet the frequency response curve. This curve represents how the filter responses to frequencies between 20hz-20khz.
Parameters
-
len
numberoptional default128The number of values to return
Returns Float32Array The frequency response curve between 20-20kHz
getDefaults()
Section titled “getDefaults()”static
getDefaults(): OnePoleFilterOptionsReturns all of the default options belonging to the class.
Returns OnePoleFilterOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()