reSIDfp::EnvelopeGenerator Class Reference

#include <EnvelopeGenerator.h>

List of all members.

Public Member Functions

void setChipModel (ChipModel chipModel)
void clock ()
short output () const
 EnvelopeGenerator ()
void reset ()
void writeCONTROL_REG (unsigned char control)
void writeATTACK_DECAY (unsigned char attack_decay)
void writeSUSTAIN_RELEASE (unsigned char sustain_release)
unsigned char readENV () const


Detailed Description

A 15 bit LFSR is used to implement the envelope rates, in effect dividing the clock to the envelope counter by the currently selected rate period.

In addition, another counter is used to implement the exponential envelope decay, in effect further dividing the clock to the envelope counter. The period of this counter is set to 1, 2, 4, 8, 16, 30 at the envelope counter values 255, 93, 54, 26, 14, 6, respectively.

Author:
Ken Händel

Dag Lem

Antti Lankila


Constructor & Destructor Documentation

reSIDfp::EnvelopeGenerator::EnvelopeGenerator (  )  [inline]

Constructor.


Member Function Documentation

RESID_INLINE void reSIDfp::EnvelopeGenerator::clock (  ) 

SID clocking - 1 cycle.

short reSIDfp::EnvelopeGenerator::output (  )  const [inline]

Get the Envelope Generator output. DAC imperfections are emulated by using envelope_counter as an index into a DAC lookup table. readENV() uses envelope_counter directly.

unsigned char reSIDfp::EnvelopeGenerator::readENV (  )  const [inline]

Return the envelope current value.

Returns:
envelope counter

void reSIDfp::EnvelopeGenerator::reset (  ) 

SID reset.

void reSIDfp::EnvelopeGenerator::setChipModel ( ChipModel  chipModel  ) 

Set chip model. This determines the type of the analog DAC emulation: 8580 is perfectly linear while 6581 is nonlinear.

Parameters:
chipModel 

void reSIDfp::EnvelopeGenerator::writeATTACK_DECAY ( unsigned char  attack_decay  ) 

Parameters:
attack_decay attack/decay value

void reSIDfp::EnvelopeGenerator::writeCONTROL_REG ( unsigned char  control  ) 

Parameters:
control control register

void reSIDfp::EnvelopeGenerator::writeSUSTAIN_RELEASE ( unsigned char  sustain_release  ) 

Parameters:
sustain_release sustain/release value


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

Generated on Sun Jul 14 23:13:00 2013 for libsidplayfp by  doxygen 1.5.9