20#ifndef __CALF_ONEPOLE_H
21#define __CALF_ONEPOLE_H
33template<
class T =
float,
class Coeff =
float>
52 Coeff
x = tan (
M_PI * fc / (2 * sr));
63 Coeff
x = tan (
M_PI * fc / (2 * sr));
86 Coeff
x = tan (
M_PI * fc / (2 * sr));
179 return std::abs(
h_z(
z));
T process_lp(T in)
Process one sample, assuming it's a lowpass filter (optimized special case).
Definition onepole.h:103
T process_ap(T in, float &x1, float &y1)
Process one sample using external state variables.
Definition onepole.h:130
bool empty() const
Definition onepole.h:147
T x1
Definition onepole.h:39
Coeff a1
Definition onepole.h:40
T y1
Definition onepole.h:39
T process(T in)
Process one sample.
Definition onepole.h:94
T process_ap(T in, float &x1, float &y1, float a0)
Process one sample using external state variables, including filter coeff.
Definition onepole.h:139
onepole()
Definition onepole.h:42
cfloat h_z(const cfloat &z) const
Definition onepole.h:184
void reset()
Definition onepole.h:157
void set_ap(float fc, float sr)
Set coefficients for an allpass filter.
Definition onepole.h:59
std::complex< double > cfloat
Definition onepole.h:37
T process_hp(T in)
Process one sample, assuming it's a highpass filter (optimized special case).
Definition onepole.h:112
void copy_coeffs(const onepole< U > &src)
Definition onepole.h:164
void set_hp(float fc, float sr)
Set coefficients for a highpass filter.
Definition onepole.h:82
Coeff a0
Definition onepole.h:40
void sanitize()
Definition onepole.h:151
T process_ap(T in)
Process one sample, assuming it's an allpass filter (optimized special case).
Definition onepole.h:121
float freq_gain(float freq, float sr) const
Definition onepole.h:174
void set_ap_w(float w)
Definition onepole.h:71
void set_lp(float fc, float sr)
Set coefficients for a lowpass filter.
Definition onepole.h:48
Coeff b1
Definition onepole.h:40
#define M_PI
Definition compat.h:149
UINT_D64 w
Definition inflate.c:942
unsigned z
Definition inflate.c:1589
unsigned x[BMAX+1]
Definition inflate.c:1586
JHUFF_TBL long freq[]
Definition jchuff.h:50
float in
Definition lilv_test.c:1460
float out
Definition lilv_test.c:1461
void zero(float &v)
Set a float to zero.
Definition primitives.h:41
void sanitize(float &value)
Definition primitives.h:354
register uch * q
Definition fileio.c:817