1 #ifndef __vaFilters_h__ 2 #define __vaFilters_h__ 33 virtual bool reset(
double _sampleRate);
39 void setAlpha(
double _alpha) { coeffs.
alpha = _alpha; }
40 void setBeta(
double _beta) { coeffs.
beta = _beta; }
46 destination.setCoeffs(coeffs);
50 double getFBOutput() {
return coeffs.
beta *
sn; }
55 double halfSamplePeriod = 1.0;
83 virtual bool reset(
double _sampleRate);
94 destination.setCoeffs(coeffs);
100 double halfSamplePeriod = 1.0;
129 virtual bool reset(
double _sampleRate);
139 for (uint32_t i = 0; i < KORG_SUBFILTERS; i++)
141 lpfVAFilters[i].setAlpha(coeffs.
alpha);
142 hpfVAFilters[i].setAlpha(coeffs.
alpha);
146 double deno = 1.0 + coeffs.
g;
148 lpfVAFilters[FLT2].setBeta((coeffs.
K * (1.0 - coeffs.
alpha)) / deno);
149 lpfVAFilters[FLT3].setBeta(-1.0 / deno);
151 hpfVAFilters[FLT2].setBeta(-coeffs.
alpha / deno);
152 hpfVAFilters[FLT3].setBeta(1.0 / deno);
157 destination.setCoeffs(coeffs);
165 double halfSamplePeriod = 1.0;
187 double subFilterBeta[MOOG_SUBFILTERS] = { 0.0, 0.0, 0.0, 0.0 };
199 virtual bool reset(
double _sampleRate);
209 for (uint32_t i = 0; i < MOOG_SUBFILTERS; i++)
212 subFilter[i].setAlpha(coeffs.
alpha);
213 subFilterFGN[i].setAlpha(coeffs.
alpha);
216 subFilter[i].setBeta(coeffs.subFilterBeta[i]);
217 subFilterFGN[i].setBeta(coeffs.subFilterBeta[i]);
222 destination.setCoeffs(coeffs);
230 double halfSamplePeriod = 1.0;
256 virtual bool reset(
double _sampleRate);
261 void setCoeffs(
const DiodeVA1Coeffs& _coeffs) { coeffs = _coeffs; }
263 destination.setCoeffs(coeffs);
266 void setFBInput(
double _feedbackIn) { feedbackIn = _feedbackIn; }
267 double getFBOutput() {
return coeffs.
beta * (
sn + feedbackIn*coeffs.
delta); }
273 double halfSamplePeriod = 1.0;
278 double feedbackIn = 0.0;
287 double beta[4] = { 0.0, 0.0, 0.0, 0.0 };
289 double bassComp = 0.0;
303 virtual bool reset(
double _sampleRate);
304 virtual bool update();
306 virtual void setFilterParams(
double _fc,
double _Q);
312 for (uint32_t i = 0; i < DIODE_SUBFILTERS; i++)
314 subFilter[i].setCoeffs(coeffs.diodeCoeffs[i]);
315 subFilterFGN[i].setCoeffs(coeffs.diodeCoeffs[i]);
320 destination.setCoeffs(coeffs);
329 double halfSamplePeriod = 1.0;
double gamma
input scalar, correct delay-free loop
Definition: vafilters.h:286
double alpha0
beta value, not used
Definition: vafilters.h:116
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:438
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:150
double sampleRate
current sample rate
Definition: vafilters.h:272
double sampleRate
current sample rate
Definition: vafilters.h:328
Definition: vafilters.h:295
virtual bool update()
update the filter due to changes in the GUI controls and/or modulations
Definition: vafilters.cpp:393
virtual FilterOutput * process(double xn)
Process audio through the filter. Different filters produce different outputs in the FilterOutput's a...
Definition: vafilters.cpp:203
Definition: vafilters.h:191
Definition: vafilters.h:281
double alpha
alpha is (wcT/2)
Definition: vafilters.h:115
virtual void setFilterParams(double _fc, double _Q)
Sets the two parameters of all synth filters. You can add more here if you need to.
Definition: vafilters.cpp:85
Definition: vafilters.h:25
double sigma
beta value, not used
Definition: vafilters.h:182
virtual void setFilterParams(double _fc, double _Q)
Sets the two parameters of all synth filters. You can add more here if you need to.
Definition: vafilters.cpp:30
double sampleRate
current sample rate
Definition: vafilters.h:99
double integrator_z[2]
state variables
Definition: vafilters.h:105
virtual bool update()
update the filter due to changes in the GUI controls and/or modulations
Definition: vafilters.cpp:98
virtual void setFilterParams(double _fc, double _Q)
Sets the two parameters of all synth filters. You can add more here if you need to.
Definition: vafilters.cpp:165
virtual FilterOutput * process(double xn)
Process audio through the filter. Different filters produce different outputs in the FilterOutput's a...
Definition: vafilters.cpp:120
double sn
state variables
Definition: vafilters.h:277
Definition: vafilters.h:248
Definition: addosccore.cpp:4
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:261
double sampleRate
current sample rate
Definition: vafilters.h:229
double rho
beta value, not used
Definition: vafilters.h:69
double bassComp
beta value, not used
Definition: vafilters.h:183
Simple interface for SynthLab filters.
Definition: synthbase.h:1017
double alpha
alpha is (wcT/2)
Definition: synthlabparams.h:200
Definition: vafilters.h:121
double K
beta value, not used
Definition: vafilters.h:114
virtual bool update()
update the filter due to changes in the GUI controls and/or modulations
Definition: vafilters.cpp:178
virtual bool update()
update the filter due to changes in the GUI controls and/or modulations
Definition: vafilters.cpp:39
double sigma
beta value, not used
Definition: vafilters.h:70
Tiny structure to hold 1st order VA filter coefficients, to make it easier to share them across sync-...
Definition: synthlabparams.h:197
double alpha
alpha is (wcT/2)
Definition: vafilters.h:68
double alpha0
beta value, not used
Definition: vafilters.h:181
double beta
beta value, not used
Definition: synthlabparams.h:201
double g
beta value, not used
Definition: vafilters.h:184
virtual bool update()
update the filter due to changes in the GUI controls and/or modulations
Definition: vafilters.cpp:289
Definition: vafilters.h:237
double delta
beta value, not used
Definition: vafilters.h:244
double alpha
alpha is (wcT/2)
Definition: vafilters.h:180
double beta
beta value, not used
Definition: vafilters.h:242
double alpha
alpha is (wcT/2)
Definition: vafilters.h:241
Definition: vafilters.h:75
double sn
state variables
Definition: vafilters.h:59
Definition: vafilters.h:111
double alpha0
input scalar, correct delay-free loop
Definition: vafilters.h:285
double sampleRate
current sample rate
Definition: vafilters.h:54
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:74
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:21
virtual void setFilterParams(double _fc, double _Q)
Sets the two parameters of all synth filters. You can add more here if you need to.
Definition: vafilters.cpp:384
double alpha0
beta value, not used
Definition: vafilters.h:71
virtual void setFilterParams(double _fc, double _Q)
Sets the two parameters of all synth filters. You can add more here if you need to.
Definition: vafilters.cpp:276
double gamma
beta value, not used
Definition: vafilters.h:243
double alpha0
input scalar, correct delay-free loop
Definition: vafilters.h:240
virtual bool reset(double _sampleRate)
Definition: vafilters.cpp:373
virtual FilterOutput * process(double xn)
Process audio through the filter. Different filters produce different outputs in the FilterOutput's a...
Definition: vafilters.cpp:319
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
virtual FilterOutput * process(double xn)
Process audio through the filter. Different filters produce different outputs in the FilterOutput's a...
Definition: vafilters.cpp:47
Holds an array of filter output values; SynthLab filters can produce multiple outputs at once...
Definition: synthbase.h:988
double g
beta value, not used
Definition: vafilters.h:117
Definition: vafilters.h:65
double K
beta value, not used
Definition: vafilters.h:179
double sampleRate
current sample rate
Definition: vafilters.h:164
Definition: vafilters.h:176
virtual FilterOutput * process(double xn)
Process audio through the filter. Different filters produce different outputs in the FilterOutput's a...
Definition: vafilters.cpp:401
See also Designing Software Synthesizers in C++ 2nd Ed. by Will Pirkle.
double epsilon
beta value, not used
Definition: vafilters.h:245