SPKitResonator
User's Guide
SPKitResonator a second order all-pole (IIR) band-pass filter.
It implements a setCenterFreqAndBW(SPKitFloat f, SPKitFloat bw)
function for setting the filter center frequency to f
and bandwidth (in cycles per second) to bw.
See also SPKitBWBandPassFilter.
For a more detailed description of the resonator,
see Dodge & Jerse (1985:186-189).
Programmer's Reference
Defined in <spkit/resonato.h>
Inherits from SPKitProcessor
SPKitResonator
implements a
setCenterFreqAndBW() function
for setting the filter center frequency and bandwidth.
It also overrides
setInput().
Public Members
- SPKitError setInput(SPKitProcessor* newInput)
- connect an input to the object and initialize it.
Allocates a delay buffer for each audio channel of the input object.
Calls
SPKitProcessor::setInput().
- void setCenterFreqAndBW
(SPKitFloat f, SPKitFloat bw)
- set filter centerFreq to f
and bandwidth to bw.
The parameters are in cycles per second.
The function calculates the filter coefficients
according to the filter center frequency, bandwidth and sampling rate
(
inputSamplingRate).
Public Members
- SPKitFloat centerFreq
- the filter center frequency
- SPKitFloat bandwidth
- the filter bandwidth
- SPKitFloat a0
- coefficients for the current input and previously read samples.
Set by setCenterFreqAndBW()
to scale the amplitude of the output signal
to a midband gain of one.
- SPKitFloat b1
- coefficients for a previous output sample
- SPKitFloat b1
- coefficients for a previous output sample
- SPKitSampleBuffer* chBuf[]
- buffers for previous output samples