26 #include "siddefs-fp.h"
31 #include "FilterModelConfig6581.h"
325 const unsigned short* f0_dac;
327 unsigned short** mixer;
328 unsigned short** summer;
329 unsigned short** gain;
331 const int voiceScaleS11;
335 std::unique_ptr<Integrator6581>
const hpIntegrator;
338 std::unique_ptr<Integrator6581>
const bpIntegrator;
371 unsigned short clock(
int voice1,
int voice2,
int voice3)
override;
373 void input(
int sample)
override {
ve = (sample * voiceScaleS11 * 3 >> 11) + mixer[0][0]; }
385 #if RESID_INLINING || defined(FILTER6581_CPP)
387 #include "Integrator6581.h"
395 voice1 = (voice1 * voiceScaleS11 >> 15) + voiceDC;
396 voice2 = (voice2 * voiceScaleS11 >> 15) + voiceDC;
398 voice3 = (filt3 || !
voice3off) ? (voice3 * voiceScaleS11 >> 15) + voiceDC : 0;
403 (
filt1 ? Vi : Vo) += voice1;
404 (filt2 ? Vi : Vo) += voice2;
405 (filt3 ? Vi : Vo) += voice3;
406 (filtE ? Vi : Vo) +=
ve;
409 Vbp = hpIntegrator->solve(
Vhp);
410 Vlp = bpIntegrator->solve(
Vbp);
Definition: Filter6581.h:323
void updateResonance(unsigned char res) override
Definition: Filter6581.h:351
void updatedCenterFrequency() override
Definition: Filter6581.cpp:37
void setFilterCurve(double curvePosition)
Definition: Filter6581.cpp:68
unsigned short clock(int voice1, int voice2, int voice3) override
Definition: Filter6581.h:393
void updatedMixing() override
Definition: Filter6581.cpp:44
Definition: FilterModelConfig6581.h:42
bool hp
Highpass, bandpass, and lowpass filter modes.
Definition: Filter.h:69
unsigned short * currentGain
Current volume amplifier setting.
Definition: Filter.h:36
int Vbp
Filter bandpass state.
Definition: Filter.h:51
unsigned short * currentSummer
Filter input summer setting.
Definition: Filter.h:42
bool voice3off
Switch voice 3 off.
Definition: Filter.h:66
unsigned short * currentMixer
Current filter/voice mixer setting.
Definition: Filter.h:39
int ve
Filter external input.
Definition: Filter.h:57
int Vhp
Filter highpass state.
Definition: Filter.h:48
unsigned short * currentResonance
Filter resonance value.
Definition: Filter.h:45
bool filt1
Routing to filter or outside filter.
Definition: Filter.h:63
int Vlp
Filter lowpass state.
Definition: Filter.h:54