sst-filters
Filters submodule for the Surge Synthesizer
Enumerations | Functions | Variables
sst::filters::OBXDFilter Namespace Reference

This namespace contains an adaptation of the filter from https://github.com/reales/OB-Xd/blob/master/Source/Engine/Filter.h. More...

Enumerations

enum  Poles { TWO_POLE , FOUR_POLE }
 
enum  Obxd12dBCoeff {
  g12 , R12 , multimode , bandpass ,
  self_osc_push , n_obxd12_coeff
}
 
enum  Obxd24dBCoeff {
  g24 , R24 , rcor24 , rcor24inv ,
  pole_mix , pole_mix_inv_int , pole_mix_scaled , n_obxd24_coeff
}
 
enum  Params { s1 , s2 , s3 , s4 }
 

Functions

template<typename TuningProvider >
void makeCoefficients (FilterCoefficientMaker< TuningProvider > *cm, Poles p, float freq, float reso, int sub, float sampleRateInv, TuningProvider *provider)
 
SIMD_M128 diodePairResistanceApprox (SIMD_M128 x)
 
SIMD_M128 NewtonRaphson12dB (SIMD_M128 sample, QuadFilterUnitState *__restrict f)
 
SIMD_M128 process_2_pole (QuadFilterUnitState *__restrict f, SIMD_M128 sample)
 
SIMD_M128 NewtonRaphsonR24dB (SIMD_M128 sample, SIMD_M128 lpc, QuadFilterUnitState *__restrict f)
 
SIMD_M128 process_4_pole (QuadFilterUnitState *__restrict f, SIMD_M128 sample)
 

Variables

const auto zero = SIMD_MM(set1_ps)(0.0f)
 
const auto nine_two_zero = SIMD_MM(set1_ps)(0.00920833f)
 
const auto zero_zero_five = SIMD_MM(set1_ps)(0.05f)
 
const auto eight_seven_six = SIMD_MM(set1_ps)(0.0876f)
 
const auto one_zero_three = SIMD_MM(set1_ps)(0.0103592f)
 
const auto one_eight_five = SIMD_MM(set1_ps)(0.185f)
 
const auto zero_four_five = SIMD_MM(set1_ps)(0.45f)
 
const auto zero_five = SIMD_MM(set1_ps)(0.5f)
 
const auto one = SIMD_MM(set1_ps)(1.0f)
 
const auto one_three_five = SIMD_MM(set1_ps)(1.035f)
 
const auto two = SIMD_MM(set1_ps)(2.0f)
 
const auto three = SIMD_MM(set1_ps)(3.0f)
 
const auto gainAdjustment2Pole = SIMD_MM(set1_ps)(0.74f)
 
const auto gainAdjustment4Pole = SIMD_MM(set1_ps)(0.6f)
 

Detailed Description

This namespace contains an adaptation of the filter from https://github.com/reales/OB-Xd/blob/master/Source/Engine/Filter.h.

Enumeration Type Documentation

◆ Poles

enum Poles
Enumerator
TWO_POLE 
FOUR_POLE 

◆ Obxd12dBCoeff

Enumerator
g12 
R12 
multimode 
bandpass 
self_osc_push 
n_obxd12_coeff 

◆ Obxd24dBCoeff

Enumerator
g24 
R24 
rcor24 
rcor24inv 
pole_mix 
pole_mix_inv_int 
pole_mix_scaled 
n_obxd24_coeff 

◆ Params

enum Params
Enumerator
s1 
s2 
s3 
s4 

Function Documentation

◆ makeCoefficients()

void sst::filters::OBXDFilter::makeCoefficients ( FilterCoefficientMaker< TuningProvider > *  cm,
Poles  p,
float  freq,
float  reso,
int  sub,
float  sampleRateInv,
TuningProvider *  provider 
)

◆ diodePairResistanceApprox()

SIMD_M128 sst::filters::OBXDFilter::diodePairResistanceApprox ( SIMD_M128  x)

◆ NewtonRaphson12dB()

SIMD_M128 sst::filters::OBXDFilter::NewtonRaphson12dB ( SIMD_M128  sample,
QuadFilterUnitState *__restrict  f 
)

◆ process_2_pole()

SIMD_M128 sst::filters::OBXDFilter::process_2_pole ( QuadFilterUnitState *__restrict  f,
SIMD_M128  sample 
)

◆ NewtonRaphsonR24dB()

SIMD_M128 sst::filters::OBXDFilter::NewtonRaphsonR24dB ( SIMD_M128  sample,
SIMD_M128  lpc,
QuadFilterUnitState *__restrict  f 
)

References g24, one, R24, S, s1, s2, s3, and s4.

Referenced by process_4_pole().

◆ process_4_pole()

SIMD_M128 sst::filters::OBXDFilter::process_4_pole ( QuadFilterUnitState *__restrict  f,
SIMD_M128  sample 
)

Variable Documentation

◆ zero

const auto zero = SIMD_MM(set1_ps)(0.0f)

◆ nine_two_zero

const auto nine_two_zero = SIMD_MM(set1_ps)(0.00920833f)

◆ zero_zero_five

const auto zero_zero_five = SIMD_MM(set1_ps)(0.05f)

◆ eight_seven_six

const auto eight_seven_six = SIMD_MM(set1_ps)(0.0876f)

Referenced by NewtonRaphson12dB().

◆ one_zero_three

const auto one_zero_three = SIMD_MM(set1_ps)(0.0103592f)

◆ one_eight_five

const auto one_eight_five = SIMD_MM(set1_ps)(0.185f)

◆ zero_four_five

const auto zero_four_five = SIMD_MM(set1_ps)(0.45f)

Referenced by process_4_pole().

◆ zero_five

const auto zero_five = SIMD_MM(set1_ps)(0.5f)

Referenced by process_2_pole().

◆ one

const auto one = SIMD_MM(set1_ps)(1.0f)

◆ one_three_five

const auto one_three_five = SIMD_MM(set1_ps)(1.035f)

Referenced by NewtonRaphson12dB().

◆ two

const auto two = SIMD_MM(set1_ps)(2.0f)

◆ three

const auto three = SIMD_MM(set1_ps)(3.0f)

Referenced by process_4_pole().

◆ gainAdjustment2Pole

const auto gainAdjustment2Pole = SIMD_MM(set1_ps)(0.74f)

Referenced by process_2_pole().

◆ gainAdjustment4Pole

const auto gainAdjustment4Pole = SIMD_MM(set1_ps)(0.6f)

Referenced by process_4_pole().