reSIDfp::Filter8580 Class Reference

`#include <Filter8580.h>`

Inheritance diagram for reSIDfp::Filter8580:

## Public Member Functions

int | clock (int voice1, int voice2, int voice3)
void | updatedCenterFrequency ()
void | updatedResonance ()
void | input (int input)
void | updatedMixing ()
void | setFilterCurve (double curvePosition)
Public Member Functions inherited from reSIDfp::Filter
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)

## Additional Inherited Members

Protected Attributes inherited from reSIDfp::Filter
unsigned int | fc
| Filter cutoff frequency.
unsigned char | res
| Filter resonance.
unsigned char | vol
| Current volume.
bool | filt1
| Routing to filter or outside filter.
bool | filt2
bool | filt3
bool | filtE
bool | voice3off
| Switch voice 3 off.
bool | hp
| Highpass, bandpass, and lowpass filter modes.
bool | bp
bool | lp

## Detailed Description

Filter for 8580 chip based on simple linear approximation of the FC control.

## Member Function Documentation

## clock()

RESID_INLINE int reSIDfp::Filter8580::clock | ( | int | v1,
|  | int | v2,
|  | int | v3
| ) |  |

virtual

SID clocking - 1 cycle

Parameters

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

Returns
  filtered output

Implements reSIDfp::Filter.

## setFilterCurve()

void reSIDfp::Filter8580::setFilterCurve | ( | double | curvePosition | ) |

inline

Set filter curve type based on single parameter.

Parameters

  curvePosition | filter's center frequency expressed in Hertz, default is 12500

## updatedCenterFrequency()

void reSIDfp::Filter8580::updatedCenterFrequency | ( |  | ) |

inline virtual

Set filter cutoff frequency.

Implements reSIDfp::Filter.

## updatedMixing()

void reSIDfp::Filter8580::updatedMixing | ( |  | ) |

inline virtual

Mixing configuration modified (offsets change)

Implements reSIDfp::Filter.

## updatedResonance()

void reSIDfp::Filter8580::updatedResonance | ( |  | ) |

inline virtual

Set filter resonance.

The following function for 1/Q has been modeled in the MOS 8580:

1/Q = 2^(1/2)*2^(-x/8) = 2^(1/2 - x/8) = 2^((4 - x)/8)

Implements reSIDfp::Filter.

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

- Filter8580.h