libsidplayfp 2.15.0
|
#include <EnvelopeGenerator.h>
Public Member Functions | |
void | clock () |
unsigned int | output () const |
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 |
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 5 bit 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.
RESID_INLINE void reSIDfp::EnvelopeGenerator::clock | ( | ) |
SID clocking.
|
inline |
Get the Envelope Generator digital output.
|
inline |
Return the envelope current value.
void reSIDfp::EnvelopeGenerator::reset | ( | ) |
SID reset.
void reSIDfp::EnvelopeGenerator::writeATTACK_DECAY | ( | unsigned char | attack_decay | ) |
Write Attack/Decay register.
attack_decay | attack/decay value |
void reSIDfp::EnvelopeGenerator::writeCONTROL_REG | ( | unsigned char | control | ) |
Write control register.
control | control register value |
void reSIDfp::EnvelopeGenerator::writeSUSTAIN_RELEASE | ( | unsigned char | sustain_release | ) |
Write Sustain/Release register.
sustain_release | sustain/release value |