Class for creating filter coefficients. More...
Public Member Functions | |
FilterCoefficientMaker () | |
Default constructor. More... | |
void | setSampleRateAndBlockSize (float newSampleRate, int newBlockSize) |
Sets the sample rate and block size to use for processing the filters. More... | |
void | Reset () |
Resets the coefficients to zero, and the tuning provider to nullptr. More... | |
void | FromDirect (const float(&N)[n_cm_coeffs]) |
Creates filter coefficients directly from an array. More... | |
void | MakeCoeffs (float Freq, float Reso, FilterType Type, FilterSubType SubType, TuningProvider *provider, bool tuningAdjusted) |
Creates filter coefficients for a given set of filter parameters. More... | |
template<typename StateType > | |
void | updateState (StateType &state, int channel=-1) |
Update the coefficients in a filter state. More... | |
template<typename StateType > | |
void | updateCoefficients (StateType &state, int channel=0) |
Update the local coefficients with the coefficients from the filter state. More... | |
Public Attributes | |
float | C [n_cm_coeffs] {} |
Current filter coefficients. More... | |
float | dC [n_cm_coeffs] {} |
Filter coefficients "delta" to update current coefficients. More... | |
float | tC [n_cm_coeffs] {} |
"Target" filter coefficients More... | |
Class for creating filter coefficients.
TuningProvider | A 12-TET tuning provider is used by default, but if you would like to support other tunings, you should use a custom tuning provider. |
Default constructor.
void setSampleRateAndBlockSize | ( | float | newSampleRate, |
int | newBlockSize | ||
) |
Sets the sample rate and block size to use for processing the filters.
void Reset |
Resets the coefficients to zero, and the tuning provider to nullptr.
References sst::filters::n_cm_coeffs.
void FromDirect | ( | const float(&) | N[n_cm_coeffs] | ) |
Creates filter coefficients directly from an array.
References N, sst::filters::n_cm_coeffs, and sst::filters::smooth.
Referenced by 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(), and sst::filters::OBXDFilter::makeCoefficients().
void MakeCoeffs | ( | float | Freq, |
float | Reso, | ||
FilterType | Type, | ||
FilterSubType | SubType, | ||
TuningProvider * | provider, | ||
bool | tuningAdjusted | ||
) |
Creates filter coefficients for a given set of filter parameters.
Note that frequency is expected in units of MIDI note number, with A440 = 0.
References sst::filters::OBXDFilter::FOUR_POLE, sst::filters::fut_apf, sst::filters::fut_bp12, sst::filters::fut_bp24, sst::filters::fut_comb_neg, sst::filters::fut_comb_pos, sst::filters::fut_cutoffwarp_ap, sst::filters::fut_cutoffwarp_bp, sst::filters::fut_cutoffwarp_hp, sst::filters::fut_cutoffwarp_lp, sst::filters::fut_cutoffwarp_n, sst::filters::fut_diode, sst::filters::fut_hp12, sst::filters::fut_hp24, sst::filters::fut_k35_hp, sst::filters::fut_k35_lp, sst::filters::fut_k35_saturations, sst::filters::fut_lp12, sst::filters::fut_lp24, sst::filters::fut_lpmoog, sst::filters::fut_none, sst::filters::fut_notch12, sst::filters::fut_notch24, sst::filters::fut_obxd_2pole_bp, sst::filters::fut_obxd_2pole_hp, sst::filters::fut_obxd_2pole_lp, sst::filters::fut_obxd_2pole_n, sst::filters::fut_obxd_4pole, sst::filters::fut_resonancewarp_ap, sst::filters::fut_resonancewarp_bp, sst::filters::fut_resonancewarp_hp, sst::filters::fut_resonancewarp_lp, sst::filters::fut_resonancewarp_n, sst::filters::fut_SNH, sst::filters::fut_tripole, sst::filters::fut_vintageladder, sst::filters::K35Filter::makeCoefficients(), 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::num_filter_types, sst::filters::st_Standard, sst::filters::st_vintage_type1, sst::filters::st_vintage_type1_compensated, sst::filters::st_vintage_type2, sst::filters::st_vintage_type2_compensated, and sst::filters::OBXDFilter::TWO_POLE.
void updateState | ( | StateType & | state, |
int | channel = -1 |
||
) |
Update the coefficients in a filter state.
To update the coefficients for a single channel, pass a channel index to the channel argument, otherwise the same coefficients will be used for all channels.
References sst::filters::n_cm_coeffs, and sst::filters::detail::set1f().
void updateCoefficients | ( | StateType & | state, |
int | channel = 0 |
||
) |
Update the local coefficients with the coefficients from the filter state.
This is necessary since the filter state is responsible for smoothing the filter coefficients.
References sst::filters::detail::get1f(), and sst::filters::n_cm_coeffs.
float C[n_cm_coeffs] {} |
Current filter coefficients.
float dC[n_cm_coeffs] {} |
Filter coefficients "delta" to update current coefficients.
float tC[n_cm_coeffs] {} |
"Target" filter coefficients