skf
Sallen-Key filter.
skf is an digital implementation of a linear Sallen-Key analogue filter, which is a second-order filter with either lowpass or highpass responses.
Syntax
Initialization
ihp -- if non-zero, select highpass response. Defaults to 0 (lowpass).
istor --initial disposition of internal data space. Since filtering incorporates a feedback loop of previous output, the initial status of the storage space used is significant. A zero value will clear the space; a non-zero value will allow previous information to remain. The default value is 0.
Performance
asig -- input
xcf -- filter cutoff frequency (a- or k-rate)
xK -- Sallen-Key opamp gain, in the range 1 to 3. At 3 the filter self-oscillates. K=1. 586 gives a Butterworth response, higher values are equivalent to Chebyshev responses (with peaking). At K=1 the filter is critically damped and the poles are real-valued.
Examples
Here is an example of the skf opcode. It uses the file skf.csd.
Example of the skf opcode. | |
---|---|
See also
Standard Filters: Resonant Low-pass filters
Credits
Author: Victor Lazzarini
Feb 2021