sst-filters
Filters submodule for the Surge Synthesizer
Namespaces | Macros | Enumerations | Functions | Variables
TriPoleFilter.h File Reference

Namespaces

 sst
 Parent namespace for all Surge Synth Team code.
 
 sst::filters
 DSP code for Surge filters.
 
 sst::filters::TriPoleFilter
 This filter is an emulation of the "Threeler" VCF by Ian Fritz (https://ijfritz.byethost4.com/Threeler_board_doc.pdf).
 
 sst::filters::TriPoleFilter::OnePoleLPF
 
 sst::filters::TriPoleFilter::OnePoleHPF
 
 sst::filters::TriPoleFilter::OnePoleLPF_FB
 
 sst::filters::TriPoleFilter::OnePoleHPF_FB
 
 sst::filters::TriPoleFilter::ResWaveshaper
 

Macros

#define F(a)   SIMD_MM(set_ps1)(a)
 
#define M(a, b)   SIMD_MM(mul_ps)(a, b)
 
#define D(a, b)   SIMD_MM(div_ps)(a, b)
 
#define A(a, b)   SIMD_MM(add_ps)(a, b)
 
#define S(a, b)   SIMD_MM(sub_ps)(a, b)
 
#define N(a)   S(F(0.0f), a)
 

Enumerations

enum  thr_coeffs {
  thr_b0 = 0 , thr_a0 , thr_b1 , thr_a1 ,
  thr_b2 , thr_a2 , thr_k , n_thr_coeff
}
 
enum  thr_state {
  thr_z0 , thr_x0 , thr_z1 , thr_x1 ,
  thr_z2 , thr_x2 , thr_fb , thr_fb1
}
 

Functions

template<typename TuningProvider >
void makeCoefficients (FilterCoefficientMaker< TuningProvider > *cm, float freq, float reso, int, float sampleRate, TuningProvider *provider)
 
template<FilterSubType subtype>
SIMD_M128 process (QuadFilterUnitState *__restrict f, SIMD_M128 in)
 

Variables

constexpr float res_gain = 1.5f
 
constexpr float in_gain = 4.0f
 
constexpr float out_gain = 1.0f / in_gain
 
constexpr int nIterGlobal = 3
 
constexpr int nIterStage = 1
 
constexpr float ota1bp = 0.88f
 
constexpr float ota1bn = 1.0f
 
constexpr float ota2bp = 0.9f
 
constexpr float ota2bn = 0.97f
 
constexpr float ota3bp = 0.95f
 
constexpr float ota3bn = 1.025f
 
constexpr float Iabc = 8.0f
 
constexpr float Rload = 220.0f
 
const auto res_factor_db = std::log10(Iabc * Rload)
 
constexpr float alpha = 1.0168177f
 
const float log_alpha = std::log(alpha)
 
constexpr float beta = 9.03240196f
 
const float beta_exp = beta * log_alpha
 
constexpr float c = 0.222161f
 
constexpr float bias = 8.2f
 
constexpr float max_val = 7.5f
 
constexpr float mult = 10.0f
 
constexpr float one = 0.99f
 
constexpr float oneOverMult = one / mult
 
const float betaExpOverMult = beta_exp / mult
 

Macro Definition Documentation

◆ F

#define F (   a)    SIMD_MM(set_ps1)(a)

◆ M

#define M (   a,
 
)    SIMD_MM(mul_ps)(a, b)

◆ D

#define D (   a,
 
)    SIMD_MM(div_ps)(a, b)

◆ A

#define A (   a,
 
)    SIMD_MM(add_ps)(a, b)

◆ S

#define S (   a,
 
)    SIMD_MM(sub_ps)(a, b)

◆ N

#define N (   a)    S(F(0.0f), a)