-
Notifications
You must be signed in to change notification settings - Fork 0
Envelope Overview
The envelope generator alters the waveform amplitude based on four 4-bit parameters (attack, decay, sustain and release) and the gate signal to mimic real instruments sound dynamic. The envelope output is an 8 bit value, clocked up or down depending on the state, which modulates the waveform output through an MDAC. When the gate goes high the volume raises up to $ff linearly then it falls down exponentially to the sustain level. Once the gate is released the volume goes down exponentially to zero. A 15 bit LFSR is used to divide the clock during the attack phase providing 16 different attack rates, ranging from 2ms to 8s. Another 5 bit LFSR further divides the clock during the decay/release phases to approximante an exponential curve, ranging from 6 ms to 24 s. The stop-points for the LFSRs are determined by two LUTs indexed by the ADR values. More details in the technical documentation.
The envelope generator is also afflicted by some "bugs", like the counter wrapping when switching quickly between attack and release or the infamous ADSR-Bug, which may cause the attack of a note to start with quite a few cycles of delay after the gate is set.
Clock
Reset
Address Decoders
Data Bus
Registers
Oscillator
Pulse Waveform
Triangle Waveform
Noise Generator
Wave Selector
Envelope Overview
Envelope Counter
Sustain Comparator
ADSR registers
Counter Logic
Exponential Divider
LFSR15 counter
LFSR5 counter
Analog stage overview
6581 DACs
6581 Opamps
6581 Filter overview
6581 Audio output
8580 DACs
8580 Virtual ground
8580 AC Voltage divider
8580 Opamps
8580 Filter overview