DSP code for Surge filters. More...
Classes | |
struct | CytomicSVF |
class | FilterCoefficientMaker |
Class for creating filter coefficients. More... | |
struct | QuadFilterUnitState |
State for a filter unit. More... | |
struct | FilterPlotParameters |
class | FilterPlotter |
Typedefs | |
typedef SIMD_M128(* | FilterUnitQFPtr) (QuadFilterUnitState *__restrict, SIMD_M128 in) |
Typedef alias for a filter unit processing method. More... | |
Functions | |
template<typename T > | |
T | db_to_linear (T in) |
float | clipscale (float freq, int subtype) |
float | boundFreq (float freq) |
double | Map2PoleResonance (double reso, double freq, int subtype) |
double | Map2PoleResonance_noboost (double reso, double, int subtype) |
double | Map4PoleResonance (double reso, double freq, int subtype) |
template<typename T > | |
T | resoscale (T reso, int subtype) |
template<typename T > | |
T | resoscale4Pole (T reso, int subtype) |
std::vector< std::pair< int, std::string > > | filterGroupName () |
template<bool Compensate> | |
FilterUnitQFPtr | GetCompensatedQFPtrFilterUnit (FilterType type, FilterSubType subtype) |
Returns a filter unit pointer and optionally applies gain scaling. More... | |
FilterUnitQFPtr | GetQFPtrFilterUnit (FilterType type, FilterSubType subtype) |
Returns a filter unit pointer for a given filter type and sub-type. More... | |
SIMD_M128 | SVFLP12Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SVFLP24Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SVFHP24Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SVFBP24Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SVFHP12Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SVFBP12Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR12Aquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR12Bquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR12WDFquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR12CFCquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR12CFLquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR24CFCquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR24CFLquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | IIR24Bquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
template<FilterSubType subtype> | |
SIMD_M128 | LPMOOGquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
SIMD_M128 | SNHquad (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
template<int COMB_SIZE> | |
SIMD_M128 | COMBquad_SSE2 (QuadFilterUnitState *__restrict f, SIMD_M128 in) |
template<int32_t scaleTimes1000, SIMD_M128(*)(QuadFilterUnitState *__restrict, SIMD_M128) F> | |
SIMD_M128 | ScaleQFPtr (QuadFilterUnitState *__restrict s, SIMD_M128 in) |
Variables | |
constexpr int | n_cm_coeffs = 8 |
constexpr float | smooth = 0.2f |
const char | filter_type_names [num_filter_types][32] |
const char | filter_menu_names [num_filter_types][32] |
const char | fut_notch_subtypes [2][32] |
const char | fut_comb_subtypes [2][64] |
const char | fut_def_subtypes [3][32] |
const char | fut_ldr_subtypes [4][32] |
const char | fut_vintageladder_subtypes [6][32] |
const char | fut_obxd_2p_subtypes [2][32] = {"Standard", "Pushed"} |
const char | fut_obxd_4p_subtypes [4][32] |
const char | fut_k35_subtypes [5][32] |
const float | fut_k35_saturations [5] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f} |
const char | fut_nlf_subtypes [4][32] |
const char | fut_nlf_saturators [4][16] |
const char | fut_tripole_subtypes [4][32] |
const char | fut_tripole_output_stage [3][16] |
const int | fut_subcount [num_filter_types] |
The number of sub-types for each filter type. More... | |
constexpr int | n_filter_registers = 16 |
Max number of registers stored in each filter state. More... | |
DSP code for Surge filters.
typedef SIMD_M128(* FilterUnitQFPtr) (QuadFilterUnitState *__restrict, SIMD_M128 in) |
Typedef alias for a filter unit processing method.
enum FilterType |
These are the filter types we have to choose from!
enum FilterSubType |
Sub-types for each filter are defined here.
enum QFUSubtypeMasks : int32_t |
T sst::filters::db_to_linear | ( | T | in | ) |
Referenced by clipscale().
float sst::filters::clipscale | ( | float | freq, |
int | subtype | ||
) |
References db_to_linear(), st_Clean, and st_Driven.
float sst::filters::boundFreq | ( | float | freq | ) |
double sst::filters::Map2PoleResonance | ( | double | reso, |
double | freq, | ||
int | subtype | ||
) |
double sst::filters::Map2PoleResonance_noboost | ( | double | reso, |
double | , | ||
int | subtype | ||
) |
References st_Driven.
double sst::filters::Map4PoleResonance | ( | double | reso, |
double | freq, | ||
int | subtype | ||
) |
T sst::filters::resoscale4Pole | ( | T | reso, |
int | subtype | ||
) |
std::vector<std::pair<int, std::string> > sst::filters::filterGroupName | ( | ) |
References fut_apf, fut_bp12, fut_bp24, fut_comb_neg, fut_comb_pos, fut_cutoffwarp_ap, fut_cutoffwarp_bp, fut_cutoffwarp_hp, fut_cutoffwarp_lp, fut_cutoffwarp_n, fut_diode, fut_hp12, fut_hp24, fut_k35_hp, fut_k35_lp, fut_lp12, fut_lp24, fut_lpmoog, fut_none, fut_notch12, fut_notch24, fut_obxd_2pole_bp, fut_obxd_2pole_hp, fut_obxd_2pole_lp, fut_obxd_2pole_n, fut_obxd_4pole, fut_resonancewarp_ap, fut_resonancewarp_bp, fut_resonancewarp_hp, fut_resonancewarp_lp, fut_resonancewarp_n, fut_SNH, fut_tripole, and fut_vintageladder.
FilterUnitQFPtr GetCompensatedQFPtrFilterUnit | ( | FilterType | type, |
FilterSubType | subtype | ||
) |
Returns a filter unit pointer and optionally applies gain scaling.
The gain scaling attempts to make levels at cutoff extream (so open for LP closed for HP) the same as bypassing the filter when sent a full spectrum saw wave. Roughly. But really it's just some constants we bodge in to turn up vintage and turn down saturated ones.
References EXTENDED_COMB, fut_apf, fut_bp12, fut_bp24, fut_comb_neg, fut_comb_pos, fut_cutoffwarp_ap, fut_cutoffwarp_bp, fut_cutoffwarp_hp, fut_cutoffwarp_lp, fut_cutoffwarp_n, fut_diode, fut_hp12, fut_hp24, fut_k35_hp, fut_k35_lp, fut_lp12, fut_lp24, fut_lpmoog, fut_none, fut_notch12, fut_notch24, fut_obxd_2pole_bp, fut_obxd_2pole_hp, fut_obxd_2pole_lp, fut_obxd_2pole_n, fut_obxd_4pole, fut_resonancewarp_ap, fut_resonancewarp_bp, fut_resonancewarp_hp, fut_resonancewarp_lp, fut_resonancewarp_n, fut_SNH, fut_tripole, fut_vintageladder, IIR12Bquad(), IIR12CFCquad(), IIR24Bquad(), IIR24CFCquad(), num_filter_types, sst::filters::VintageLadder::Huov::process(), sst::filters::VintageLadder::RK::process(), sst::filters::OBXDFilter::process_2_pole(), sst::filters::OBXDFilter::process_4_pole(), sst::filters::K35Filter::process_hp(), sst::filters::K35Filter::process_lp(), SNHquad(), st_Clean, st_cutoffwarp_ojd1, st_cutoffwarp_ojd2, st_cutoffwarp_ojd3, st_cutoffwarp_ojd4, st_cutoffwarp_softclip1, st_cutoffwarp_softclip2, st_cutoffwarp_softclip3, st_cutoffwarp_softclip4, st_cutoffwarp_tanh1, st_cutoffwarp_tanh2, st_cutoffwarp_tanh3, st_cutoffwarp_tanh4, st_diode_12dB, st_diode_18dB, st_diode_24dB, st_diode_6dB, st_Driven, st_lpmoog_12dB, st_lpmoog_18dB, st_lpmoog_24dB, st_lpmoog_6dB, st_resonancewarp_softclip1, st_resonancewarp_softclip2, st_resonancewarp_softclip3, st_resonancewarp_softclip4, st_resonancewarp_tanh1, st_resonancewarp_tanh2, st_resonancewarp_tanh3, st_resonancewarp_tanh4, st_Standard, st_tripole_HHH1, st_tripole_HHH2, st_tripole_HHH3, st_tripole_HLH1, st_tripole_HLH2, st_tripole_HLH3, st_tripole_LHL1, st_tripole_LHL2, st_tripole_LHL3, st_tripole_LLL1, st_tripole_LLL2, st_tripole_LLL3, SVFBP12Aquad(), SVFBP24Aquad(), SVFHP12Aquad(), SVFHP24Aquad(), SVFLP12Aquad(), and SVFLP24Aquad().
FilterUnitQFPtr sst::filters::GetQFPtrFilterUnit | ( | FilterType | type, |
FilterSubType | subtype | ||
) |
Returns a filter unit pointer for a given filter type and sub-type.
SIMD_M128 sst::filters::SVFLP12Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::SVFLP24Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::SVFHP24Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::SVFBP24Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::SVFHP12Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::SVFBP12Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::IIR12Aquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
SIMD_M128 sst::filters::IIR12Bquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::IIR12WDFquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
References sst::filters::OBXDFilter::s1, and sst::filters::OBXDFilter::s2.
SIMD_M128 sst::filters::IIR12CFCquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
References sst::filters::OBXDFilter::s1, and sst::filters::OBXDFilter::s2.
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::IIR12CFLquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
SIMD_M128 sst::filters::IIR24CFCquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
References sst::filters::OBXDFilter::s1, sst::filters::OBXDFilter::s2, sst::filters::OBXDFilter::s3, and sst::filters::OBXDFilter::s4.
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::IIR24CFLquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
SIMD_M128 sst::filters::IIR24Bquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::LPMOOGquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
SIMD_M128 sst::filters::SNHquad | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
Referenced by GetCompensatedQFPtrFilterUnit().
SIMD_M128 sst::filters::COMBquad_SSE2 | ( | QuadFilterUnitState *__restrict | f, |
SIMD_M128 | in | ||
) |
References SincTable::FIRipol_M, SincTable::FIRipol_N, and SincTable::FIRoffset.
SIMD_M128 sst::filters::ScaleQFPtr | ( | QuadFilterUnitState *__restrict | s, |
SIMD_M128 | in | ||
) |
References F.
|
constexpr |
Referenced by FilterCoefficientMaker< TuningProvider >::FromDirect(), sst::filters::VintageLadder::RK::makeCoefficients(), sst::filters::VintageLadder::Huov::makeCoefficients(), sst::filters::DiodeLadderFilter::makeCoefficients(), sst::filters::ResonanceWarp::makeCoefficients(), sst::filters::CutoffWarp::makeCoefficients(), sst::filters::TriPoleFilter::makeCoefficients(), sst::filters::OBXDFilter::makeCoefficients(), sst::filters::DiodeLadderFilter::process(), sst::filters::K35Filter::processCoeffs(), FilterCoefficientMaker< TuningProvider >::Reset(), FilterCoefficientMaker< TuningProvider >::updateCoefficients(), and FilterCoefficientMaker< TuningProvider >::updateState().
|
constexpr |
Referenced by FilterCoefficientMaker< TuningProvider >::FromDirect().
const char filter_type_names[num_filter_types][32] |
const char filter_menu_names[num_filter_types][32] |
const char fut_notch_subtypes[2][32] |
const char fut_comb_subtypes[2][64] |
const char fut_def_subtypes[3][32] |
const char fut_ldr_subtypes[4][32] |
const char fut_vintageladder_subtypes[6][32] |
const char fut_obxd_2p_subtypes[2][32] = {"Standard", "Pushed"} |
const char fut_obxd_4p_subtypes[4][32] |
const char fut_k35_subtypes[5][32] |
const float fut_k35_saturations[5] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f} |
Referenced by FilterCoefficientMaker< TuningProvider >::MakeCoeffs().
const char fut_nlf_subtypes[4][32] |
const char fut_nlf_saturators[4][16] |
const char fut_tripole_subtypes[4][32] |
const char fut_tripole_output_stage[3][16] |
const int fut_subcount[num_filter_types] |
The number of sub-types for each filter type.
|
constexpr |
Max number of registers stored in each filter state.