Klasse Filter
- Bekannte direkte Unterklassen:
Filter6581,Filter8580
Measurements show that excellent emulation of the SID filter is achieved, except when high resonance is combined with high sustain levels. In this case the SID op-amps are performing less than ideally and are causing some peculiar behavior of the SID filter. This however seems to have more effect on the overall amplitude than on the color of the sound.
The theory for the filter circuit can be found in "Microelectric Circuits" by Adel S. Sedra and Kenneth C. Smith. The circuit is modeled based on the explanation found there except that an additional inverter is used in the feedback from the bandpass output, allowing the summer op-amp to operate in single-ended mode. This yields inverted filter outputs with levels independent of Q, which corresponds with the results obtained from a real SID.
We have been able to model the summer and the two integrators of the circuit to form components of an IIR filter. Vhp is the output of the summer, Vbp is the output of the first integrator, and Vlp is the output of the second integrator in the filter circuit.
According to Bob Yannes, the active stages of the SID filter are not really op-amps. Rather, simple NMOS inverters are used. By biasing an inverter into its region of quasi-linear operation using a feedback resistor from input to output, a MOS inverter can be made to act like an op-amp for small signals centered around the switching threshold.
Qualified guesses at SID filter schematics are depicted below.
SID filter
----------
-----------------------------------------------
| |
| ---Rq-- |
| | | |
| ------------<A]-----R1--------- |
| | | |
| | ---C---| ---C---|
| | | | | |
| --R1-- ---R1-- |---Rs--| |---Rs--|
| | | | | | | |
----R1--|-----[A>--|--R-----[A>--|--R-----[A>--|
| | | |
vi -----R1-- | | |
vhp vbp vlp
vi - input voltage
vhp - highpass output
vbp - bandpass output
vlp - lowpass output
[A> - op-amp
R1 - summer resistor
Rq - resistor array controlling resonance (4 resistors)
R - NMOS FET voltage controlled resistor controlling cutoff frequency
Rs - shunt resitor
C - capacitor
SID integrator
--------------
V+
|
|
-----|
| |
| ||--
-||
---C--- ||->
| | |
|---Rs-----------|---- vo
| |
| ||--
vi ---- -----|------------||
| ˆ | ||->
|___| | |
----- | |
| | |
|---R2-- |
|
R1 V-
|
|
Vw
----------------------------------------------------------------------------
- Autor:
- Ken Händel
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected floatprotected booleanHighpass, bandpass, and lowpass filter modes.protected doubleprivate booleanFilter enabled.protected intFilter cutoff frequency.private byteSelects which inputs to route through filter.protected booleanprotected booleanprotected booleanprotected booleanprotected booleanHighpass, bandpass, and lowpass filter modes.protected booleanHighpass, bandpass, and lowpass filter modes.protected intFilter resonance.protected floatprotected floatprotected floatprotected floatprotected booleanSwitch voice 3 off.protected float -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract floatclock(float v1, float v2, float v3, float vE) SID clocking - 1 cyclevoidenable(boolean enable) Enable filter.abstract float[]abstract float[]protected final voidreset()SID reset.protected voidsetClockFrequency(double clock) abstract voidabstract voidsetCurveProperties(float a, float b, float c, float d) abstract voidsetDistortionProperties(float a, float b, float c) protected abstract voidSet filter cutoff frequency.protected abstract voidSet filter resonance.protected final voidwriteFC_HI(byte fc_hi) Register functions.protected final voidwriteFC_LO(byte fc_lo) Register functions.protected final voidwriteMODE_VOL(byte mode_vol) Register functions.protected final voidwriteRES_FILT(byte res_filt) Register functions.protected final void
-
Felddetails
-
enabled
private boolean enabledFilter enabled. -
fc
protected int fcFilter cutoff frequency. -
res
protected int resFilter resonance. -
filt
private byte filtSelects which inputs to route through filter. -
filt1
protected boolean filt1 -
filt2
protected boolean filt2 -
filt3
protected boolean filt3 -
filtE
protected boolean filtE -
voice3off
protected boolean voice3offSwitch voice 3 off. -
hp
protected boolean hpHighpass, bandpass, and lowpass filter modes. -
bp
protected boolean bpHighpass, bandpass, and lowpass filter modes. -
lp
protected boolean lpHighpass, bandpass, and lowpass filter modes. -
vol
protected float vol -
clockFrequency
protected double clockFrequency -
Vhp
protected float Vhp -
Vbp
protected float Vbp -
Vlp
protected float Vlp -
_1_div_Q
protected float _1_div_Q -
resonanceFactor
protected float resonanceFactor
-
-
Konstruktordetails
-
Filter
public Filter()
-
-
Methodendetails
-
clock
protected abstract float clock(float v1, float v2, float v3, float vE) SID clocking - 1 cycle- Parameter:
v1- voice 1 inv2- voice 2 inv3- voice 3 invE- external audio in- Gibt zurück:
- filtered output
-
zeroDenormals
protected final void zeroDenormals() -
setCurveAndDistortionDefaults
public abstract void setCurveAndDistortionDefaults() -
enable
public void enable(boolean enable) Enable filter.- Parameter:
enable-
-
setClockFrequency
protected void setClockFrequency(double clock) -
getCurveProperties
public abstract float[] getCurveProperties() -
setCurveProperties
public abstract void setCurveProperties(float a, float b, float c, float d) -
getDistortionProperties
public abstract float[] getDistortionProperties() -
setDistortionProperties
public abstract void setDistortionProperties(float a, float b, float c) -
reset
protected final void reset()SID reset. -
writeFC_LO
protected final void writeFC_LO(byte fc_lo) Register functions.- Parameter:
fc_lo-
-
writeFC_HI
protected final void writeFC_HI(byte fc_hi) Register functions.- Parameter:
fc_hi-
-
writeRES_FILT
protected final void writeRES_FILT(byte res_filt) Register functions.- Parameter:
res_filt-
-
writeMODE_VOL
protected final void writeMODE_VOL(byte mode_vol) Register functions.- Parameter:
mode_vol-
-
updatedCenterFrequency
protected abstract void updatedCenterFrequency()Set filter cutoff frequency. -
updatedResonance
protected abstract void updatedResonance()Set filter resonance.
-