reSIDfp::Filter Class Referenceabstract

`#include <Filter.h>`

Inheritance diagram for reSIDfp::Filter:

## Public Member Functions

| Filter (FilterModelConfig &fmc)
virtual unsigned short | clock (int v1, int v2, int v3)=0
void | enable (bool enable)
void | reset ()
void | writeFC_LO (unsigned char fc_lo)
void | writeFC_HI (unsigned char fc_hi)
void | writeRES_FILT (unsigned char res_filt)
void | writeMODE_VOL (unsigned char mode_vol)
void | input (short input)
int | getNormalizedVoice (float value, unsigned int env) const

## Protected Member Functions

virtual void | updateCenterFrequency ()=0
void | updateResonance (unsigned char res)
void | updateMixing ()
unsigned int | getFC () const

## Protected Attributes

FilterModelConfig & | fmc
unsigned short * | currentMixer = nullptr
| Current filter/voice mixer setting.
unsigned short * | currentSummer = nullptr
| Filter input summer setting.
unsigned short * | currentResonance = nullptr
| Filter resonance value.
unsigned short * | currentVolume = nullptr
| Current volume amplifier setting.
int | Vhp = 0
| Filter highpass state.
int | Vbp = 0
| Filter bandpass state.
int | Vlp = 0
| Filter lowpass state.
int | Ve = 0
| Filter external input.
unsigned int | fc = 0
| Filter cutoff frequency.
bool | filt1 = false
| Routing to filter or outside filter.
bool | filt2 = false
bool | filt3 = false
bool | filtE = false
bool | voice3off = false
| Switch voice 3 off.
bool | hp = false
| Highpass, bandpass, and lowpass filter modes.
bool | bp = false
bool | lp = false

## Detailed Description

SID filter base class

## Member Function Documentation

## clock()

virtual unsigned short reSIDfp::Filter::clock | ( | int | v1,
|  | int | v2,
|  | int | v3
| ) |  |

pure virtual

SID clocking - 1 cycle

Parameters

  v1 | voice 1 in
  v2 | voice 2 in
  v3 | voice 3 in

Returns
  filtered output

Implemented in reSIDfp::Filter6581.

## enable()

void reSIDfp::Filter::enable | ( | bool | enable | ) |

Enable filter.

Parameters

  enable |

## getFC()

unsigned int reSIDfp::Filter::getFC | ( |  | ) | const

inline protected

Get the filter cutoff register value

## input()

void reSIDfp::Filter::input | ( | short | input | ) |

inline

Apply a signal to EXT-IN

Parameters

  input | a signed 16 bit sample

## reset()

void reSIDfp::Filter::reset | ( |  | ) |

SID reset.

## updateCenterFrequency()

virtual void reSIDfp::Filter::updateCenterFrequency | ( |  | ) |

protected pure virtual

Update filter cutoff frequency.

Implemented in reSIDfp::Filter6581.

## updateMixing()

void reSIDfp::Filter::updateMixing | ( |  | ) |

protected

Mixing configuration modified (offsets change)

## updateResonance()

void reSIDfp::Filter::updateResonance | ( | unsigned char | res | ) |

inline protected

Update filter resonance.

Parameters

  res | the new resonance value

## writeFC_HI()

void reSIDfp::Filter::writeFC_HI | ( | unsigned char | fc_hi | ) |

Write Frequency Cutoff High register.

Parameters

  fc_hi | Frequency Cutoff High-Byte

## writeFC_LO()

void reSIDfp::Filter::writeFC_LO | ( | unsigned char | fc_lo | ) |

Write Frequency Cutoff Low register.

Parameters

  fc_lo | Frequency Cutoff Low-Byte

## writeMODE_VOL()

void reSIDfp::Filter::writeMODE_VOL | ( | unsigned char | mode_vol | ) |

Write filter Mode/Volume register.

Parameters

  mode_vol | Filter Mode/Volume

## writeRES_FILT()

void reSIDfp::Filter::writeRES_FILT | ( | unsigned char | res_filt | ) |

Write Resonance/Filter register.

Parameters

  res_filt | Resonance/Filter

The documentation for this class was generated from the following files:

- Filter.h
- Filter.cpp