DSP code for Surge waveshapers. More...
Namespaces | |
utilities | |
Utility code needed for Surge waveshapers. | |
Classes | |
struct | ChebSeries |
struct | QuadWaveshaperState |
struct | FolderADAA |
struct | LUTBase |
struct | WaveshaperTables |
Lookup table for waveshapers. More... | |
Typedefs | |
typedef SIMD_M128(* | QuadWaveshaperPtr) (QuadWaveshaperState *__restrict, SIMD_M128 in, SIMD_M128 drive) |
Enumerations | |
enum class | WaveshaperType { wst_none = 0 , wst_soft , wst_hard , wst_asym , wst_sine , wst_digital , wst_cheby2 , wst_cheby3 , wst_cheby4 , wst_cheby5 , wst_fwrectify , wst_poswav , wst_negwav , wst_softrect , wst_singlefold , wst_dualfold , wst_westfold , wst_add12 , wst_add13 , wst_add14 , wst_add15 , wst_add12345 , wst_addsaw3 , wst_addsqr3 , wst_fuzz , wst_fuzzsoft , wst_fuzzheavy , wst_fuzzctr , wst_fuzzsoftedge , wst_sinpx , wst_sin2xpb , wst_sin3xpb , wst_sin7xpb , wst_sin10xpb , wst_2cyc , wst_7cyc , wst_10cyc , wst_2cycbound , wst_7cycbound , wst_10cycbound , wst_zamsat , wst_ojd , wst_softfold , wst_linearfold , wst_sinefold , n_ws_types } |
Functions | |
template<void FandADF, int xR, int aR, bool updateInit = true> | |
SIMD_M128 | ADAA (QuadWaveshaperState *__restrict s, SIMD_M128 x) |
template<int R1, int R2> | |
SIMD_M128 | dcBlock (QuadWaveshaperState *__restrict s, SIMD_M128 x) |
SIMD_M128 | DIGI_SSE2 (QuadWaveshaperState *__restrict, SIMD_M128 in, SIMD_M128 drive) |
template<bool DO_FOLD = false> | |
SIMD_M128 | SINUS_SSE2 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
template<int scale> | |
float | FuzzTable (const float x) |
template<int scale, SIMD_M128 C> | |
SIMD_M128 | Fuzz (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
float | FuzzCtrTable (const float x) |
float | FuzzEdgeTable (const float x) |
template<SIMD_M128(*)(SIMD_M128) K, bool useDCBlock> | |
SIMD_M128 | CHEBY_CORE (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
SIMD_M128 | cheb2_kernel (SIMD_M128 x) |
SIMD_M128 | cheb3_kernel (SIMD_M128 x) |
SIMD_M128 | cheb4_kernel (SIMD_M128 x) |
SIMD_M128 | cheb5_kernel (SIMD_M128 x) |
SIMD_M128 | Plus12 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | Plus13 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | Plus14 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | Plus15 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | Plus12345 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | PlusSaw3 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | PlusSqr3 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
QuadWaveshaperPtr | GetQuadWaveshaper (WaveshaperType type) |
void | initializeWaveshaperRegister (WaveshaperType type, float R[n_waveshaper_registers]) |
void | posrect_kernel (SIMD_M128 x, SIMD_M128 &f, SIMD_M128 &adF) |
template<int R1, int R2> | |
SIMD_M128 | ADAA_POS_WAVE (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
void | negrect_kernel (SIMD_M128 x, SIMD_M128 &f, SIMD_M128 &adF) |
template<int R1, int R2> | |
SIMD_M128 | ADAA_NEG_WAVE (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
void | fwrect_kernel (SIMD_M128 x, SIMD_M128 &F, SIMD_M128 &adF) |
SIMD_M128 | ADAA_FULL_WAVE (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
void | softrect_kernel (SIMD_M128 x, SIMD_M128 &F, SIMD_M128 &adF) |
SIMD_M128 | ADAA_SOFTRECT_WAVE (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
SIMD_M128 | CLIP (QuadWaveshaperState *__restrict, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | TANH (QuadWaveshaperState *__restrict, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | ZAMSAT (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
SIMD_M128 | ASYM_SSE2 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
SIMD_M128 | OJD (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
float | SinPlusX (const float x) |
template<int T> | |
float | SinNXPlusXBound (const float x) |
template<int T> | |
float | SinNX (const float x) |
template<int T> | |
float | SinNXBound (const float x) |
void | singleFoldADAA (SIMD_M128 x, SIMD_M128 &f, SIMD_M128 &adf) |
void | dualFoldADAA (SIMD_M128 x, SIMD_M128 &f, SIMD_M128 &adf) |
void | westCoastFoldADAA (SIMD_M128 x, SIMD_M128 &f, SIMD_M128 &adf) |
template<void F> | |
SIMD_M128 | WAVEFOLDER (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
SIMD_M128 | SoftOneFold (QuadWaveshaperState *__restrict, SIMD_M128 x, SIMD_M128 drive) |
SIMD_M128 | LINFOLD_SSE2 (QuadWaveshaperState *__restrict s, SIMD_M128 in, SIMD_M128 drive) |
std::vector< std::pair< int, std::string > > | WaveshaperGroupName () |
template<int xRes, int xCenter, int size> | |
SIMD_M128 | WS_LUT (QuadWaveshaperState *__restrict, const float *table, SIMD_M128 in, SIMD_M128 drive) |
template<int N> | |
SIMD_M128 | WS_PM1_LUT (const float *table, SIMD_M128 in) |
template<float F, int N, SIMD_M128 C, bool block = true> | |
SIMD_M128 | TableEval (QuadWaveshaperState *__restrict s, SIMD_M128 x, SIMD_M128 drive) |
Variables | |
constexpr int | n_waveshaper_registers = 4 |
const char | wst_names [(int) WaveshaperType::n_ws_types][32] |
DSP code for Surge waveshapers.
typedef SIMD_M128(* QuadWaveshaperPtr) (QuadWaveshaperState *__restrict, SIMD_M128 in, SIMD_M128 drive) |
|
strong |
SIMD_M128 sst::waveshapers::ADAA | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x | ||
) |
SIMD_M128 sst::waveshapers::dcBlock | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x | ||
) |
SIMD_M128 sst::waveshapers::DIGI_SSE2 | ( | QuadWaveshaperState * | __restrict, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::SINUS_SSE2 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References Catch::Generators::table(), and wst_sine.
float sst::waveshapers::FuzzTable | ( | const float | x | ) |
References Catch::Generators::range().
SIMD_M128 sst::waveshapers::Fuzz | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References Catch::Generators::table().
float sst::waveshapers::FuzzCtrTable | ( | const float | x | ) |
float sst::waveshapers::FuzzEdgeTable | ( | const float | x | ) |
SIMD_M128 sst::waveshapers::CHEBY_CORE | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References TANH().
SIMD_M128 sst::waveshapers::cheb2_kernel | ( | SIMD_M128 | x | ) |
SIMD_M128 sst::waveshapers::cheb3_kernel | ( | SIMD_M128 | x | ) |
SIMD_M128 sst::waveshapers::cheb4_kernel | ( | SIMD_M128 | x | ) |
SIMD_M128 sst::waveshapers::cheb5_kernel | ( | SIMD_M128 | x | ) |
SIMD_M128 sst::waveshapers::Plus12 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::Plus13 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References ChebSeries< len >::eval(), and TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::Plus14 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::Plus15 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References ChebSeries< len >::eval(), and TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::Plus12345 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::PlusSaw3 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::PlusSqr3 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References ChebSeries< len >::eval(), and TANH().
Referenced by GetQuadWaveshaper().
QuadWaveshaperPtr GetQuadWaveshaper | ( | WaveshaperType | type | ) |
References ADAA_FULL_WAVE(), ADAA_SOFTRECT_WAVE(), ASYM_SSE2(), CLIP(), DIGI_SSE2(), LINFOLD_SSE2(), n_ws_types, OJD(), Plus12(), Plus12345(), Plus13(), Plus14(), Plus15(), PlusSaw3(), PlusSqr3(), SoftOneFold(), TANH(), wst_10cyc, wst_10cycbound, wst_2cyc, wst_2cycbound, wst_7cyc, wst_7cycbound, wst_add12, wst_add12345, wst_add13, wst_add14, wst_add15, wst_addsaw3, wst_addsqr3, wst_asym, wst_cheby2, wst_cheby3, wst_cheby4, wst_cheby5, wst_digital, wst_dualfold, wst_fuzz, wst_fuzzctr, wst_fuzzheavy, wst_fuzzsoft, wst_fuzzsoftedge, wst_fwrectify, wst_hard, wst_linearfold, wst_negwav, wst_none, wst_ojd, wst_poswav, wst_sin10xpb, wst_sin2xpb, wst_sin3xpb, wst_sin7xpb, wst_sine, wst_sinefold, wst_singlefold, wst_sinpx, wst_soft, wst_softfold, wst_softrect, wst_westfold, wst_zamsat, and ZAMSAT().
void initializeWaveshaperRegister | ( | WaveshaperType | type, |
float | R[n_waveshaper_registers] | ||
) |
References n_waveshaper_registers.
void sst::waveshapers::posrect_kernel | ( | SIMD_M128 | x, |
SIMD_M128 & | f, | ||
SIMD_M128 & | adF | ||
) |
SIMD_M128 sst::waveshapers::ADAA_POS_WAVE | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References CLIP().
void sst::waveshapers::negrect_kernel | ( | SIMD_M128 | x, |
SIMD_M128 & | f, | ||
SIMD_M128 & | adF | ||
) |
SIMD_M128 sst::waveshapers::ADAA_NEG_WAVE | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References CLIP().
void sst::waveshapers::fwrect_kernel | ( | SIMD_M128 | x, |
SIMD_M128 & | F, | ||
SIMD_M128 & | adF | ||
) |
SIMD_M128 sst::waveshapers::ADAA_FULL_WAVE | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References CLIP().
Referenced by GetQuadWaveshaper().
void sst::waveshapers::softrect_kernel | ( | SIMD_M128 | x, |
SIMD_M128 & | F, | ||
SIMD_M128 & | adF | ||
) |
SIMD_M128 sst::waveshapers::ADAA_SOFTRECT_WAVE | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References TANH().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::CLIP | ( | QuadWaveshaperState * | __restrict, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
Referenced by ADAA_FULL_WAVE(), ADAA_NEG_WAVE(), ADAA_POS_WAVE(), GetQuadWaveshaper(), and ZAMSAT().
SIMD_M128 sst::waveshapers::TANH | ( | QuadWaveshaperState * | __restrict, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
Referenced by ADAA_SOFTRECT_WAVE(), CHEBY_CORE(), GetQuadWaveshaper(), Plus12(), Plus12345(), Plus13(), Plus14(), Plus15(), PlusSaw3(), and PlusSqr3().
SIMD_M128 sst::waveshapers::ZAMSAT | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References CLIP().
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::ASYM_SSE2 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References wst_asym.
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::OJD | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
Referenced by GetQuadWaveshaper().
float sst::waveshapers::SinPlusX | ( | const float | x | ) |
float sst::waveshapers::SinNXPlusXBound | ( | const float | x | ) |
float sst::waveshapers::SinNX | ( | const float | x | ) |
float sst::waveshapers::SinNXBound | ( | const float | x | ) |
void sst::waveshapers::singleFoldADAA | ( | SIMD_M128 | x, |
SIMD_M128 & | f, | ||
SIMD_M128 & | adf | ||
) |
References FolderADAA< pts >::evaluate().
void sst::waveshapers::dualFoldADAA | ( | SIMD_M128 | x, |
SIMD_M128 & | f, | ||
SIMD_M128 & | adf | ||
) |
References FolderADAA< pts >::evaluate().
void sst::waveshapers::westCoastFoldADAA | ( | SIMD_M128 | x, |
SIMD_M128 & | f, | ||
SIMD_M128 & | adf | ||
) |
References FolderADAA< pts >::evaluate().
SIMD_M128 sst::waveshapers::WAVEFOLDER | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
SIMD_M128 sst::waveshapers::SoftOneFold | ( | QuadWaveshaperState * | __restrict, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
Referenced by GetQuadWaveshaper().
SIMD_M128 sst::waveshapers::LINFOLD_SSE2 | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
Referenced by GetQuadWaveshaper().
std::vector<std::pair<int, std::string> > sst::waveshapers::WaveshaperGroupName | ( | ) |
References wst_10cyc, wst_10cycbound, wst_2cyc, wst_2cycbound, wst_7cyc, wst_7cycbound, wst_add12, wst_add12345, wst_add13, wst_add14, wst_add15, wst_addsaw3, wst_addsqr3, wst_asym, wst_cheby2, wst_cheby3, wst_cheby4, wst_cheby5, wst_digital, wst_dualfold, wst_fuzz, wst_fuzzctr, wst_fuzzheavy, wst_fuzzsoft, wst_fuzzsoftedge, wst_fwrectify, wst_hard, wst_linearfold, wst_negwav, wst_none, wst_ojd, wst_poswav, wst_sin10xpb, wst_sin2xpb, wst_sin3xpb, wst_sin7xpb, wst_sine, wst_sinefold, wst_singlefold, wst_sinpx, wst_soft, wst_softfold, wst_softrect, wst_westfold, and wst_zamsat.
SIMD_M128 sst::waveshapers::WS_LUT | ( | QuadWaveshaperState * | __restrict, |
const float * | table, | ||
SIMD_M128 | in, | ||
SIMD_M128 | drive | ||
) |
References Catch::Generators::table().
SIMD_M128 sst::waveshapers::WS_PM1_LUT | ( | const float * | table, |
SIMD_M128 | in | ||
) |
References Catch::Generators::table().
SIMD_M128 sst::waveshapers::TableEval | ( | QuadWaveshaperState *__restrict | s, |
SIMD_M128 | x, | ||
SIMD_M128 | drive | ||
) |
References Catch::Generators::table().
|
constexpr |
Referenced by initializeWaveshaperRegister().
const char wst_names[(int) WaveshaperType::n_ws_types][32] |