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)
 
__m128 diodePairResistanceApprox (__m128 x)
 
__m128 NewtonRaphson12dB (__m128 sample, QuadFilterUnitState *__restrict f)
 
__m128 process_2_pole (QuadFilterUnitState *__restrict f, __m128 sample)
 
__m128 NewtonRaphsonR24dB (__m128 sample, __m128 lpc, QuadFilterUnitState *__restrict f)
 
__m128 process_4_pole (QuadFilterUnitState *__restrict f, __m128 sample)
 

Variables

const __m128 zero = _mm_set1_ps(0.0f)
 
const __m128 nine_two_zero = _mm_set1_ps(0.00920833f)
 
const __m128 zero_zero_five = _mm_set1_ps(0.05f)
 
const __m128 eight_seven_six = _mm_set1_ps(0.0876f)
 
const __m128 one_zero_three = _mm_set1_ps(0.0103592f)
 
const __m128 one_eight_five = _mm_set1_ps(0.185f)
 
const __m128 zero_four_five = _mm_set1_ps(0.45f)
 
const __m128 zero_five = _mm_set1_ps(0.5f)
 
const __m128 one = _mm_set1_ps(1.0f)
 
const __m128 one_three_five = _mm_set1_ps(1.035f)
 
const __m128 two = _mm_set1_ps(2.0f)
 
const __m128 three = _mm_set1_ps(3.0f)
 
const __m128 gainAdjustment2Pole = _mm_set1_ps(0.74f)
 
const __m128 gainAdjustment4Pole = _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()

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

◆ NewtonRaphson12dB()

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

◆ process_2_pole()

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

◆ NewtonRaphsonR24dB()

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

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

Referenced by process_4_pole().

◆ process_4_pole()

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

Variable Documentation

◆ zero

const __m128 zero = _mm_set1_ps(0.0f)

◆ nine_two_zero

const __m128 nine_two_zero = _mm_set1_ps(0.00920833f)

◆ zero_zero_five

const __m128 zero_zero_five = _mm_set1_ps(0.05f)

◆ eight_seven_six

const __m128 eight_seven_six = _mm_set1_ps(0.0876f)

Referenced by NewtonRaphson12dB().

◆ one_zero_three

const __m128 one_zero_three = _mm_set1_ps(0.0103592f)

◆ one_eight_five

const __m128 one_eight_five = _mm_set1_ps(0.185f)

◆ zero_four_five

const __m128 zero_four_five = _mm_set1_ps(0.45f)

Referenced by process_4_pole().

◆ zero_five

const __m128 zero_five = _mm_set1_ps(0.5f)

Referenced by process_2_pole().

◆ one

const __m128 one = _mm_set1_ps(1.0f)

◆ one_three_five

const __m128 one_three_five = _mm_set1_ps(1.035f)

Referenced by NewtonRaphson12dB().

◆ two

const __m128 two = _mm_set1_ps(2.0f)

◆ three

const __m128 three = _mm_set1_ps(3.0f)

Referenced by process_4_pole().

◆ gainAdjustment2Pole

const __m128 gainAdjustment2Pole = _mm_set1_ps(0.74f)

Referenced by process_2_pole().

◆ gainAdjustment4Pole

const __m128 gainAdjustment4Pole = _mm_set1_ps(0.6f)

Referenced by process_4_pole().