VCA and EG

Yuhei Horibe
3 min readNov 28, 2020

--

Figure 1. Synthesizer block diagram

Overview

VCA (Voltage Controlled Oscillator) controls the amplitude/volume of the tone. It’s not just the velocity of the note, but it changes the volume time to time, to simulate the actual musical instruments. To make this happen, EG (Envelope Generator) is also used. In this section, the focus is on the design of both EG and VCA.

The overview of entire synthesizer hardware is explained below.

Digital Synthesizer Hardware Design

Envelope Generator

To simulate the actual musical instruments, VCA changes the volume of the tone time to time. For example, instruments like piano, volume rises quickly since when the note is played, and the volume drops sharply soon. Another example is string instruments. Volume rises slowly, and it sustains after. Those changes of the volume is divided into 4 part. Figure 2 shows the volume change pattern.

Figure 2. Volume change pattern (Envelope)

In figure 2, y axis shows the change of the volume of the note, and x axis is the time passed from when the note is played. This pattern is generated from 4 different parameters.

  • Attack time
  • Decay time
  • Sustain level
  • Release time

Attack time is the time from when the note is played, to when volume peaks. Instruments like piano, trumpet, marimba etc… rise the volume sharply after note is played, and strings, horn etc… slowly rises volume.

Decay time is the time from when volume peaked, to when volume stabilizes.

Sustain level is the volume after the peak. After decay period has passed, volume stays until the note signal is tuned off.

Release time determines how the note disappears. Sound stays long after note signal is off if release time is long, and sound disappears immediately after note signal is off if release time is short.

Those state change is described as state machine. Figure 3 shows the state machine of the envelope generator.

Figure 3. State machine design of Envelope Generator

When reset, it starts from “Note off” state. If note_on signal is low, it stays there. If note_on signal is high, it moves to “Attack” state. In Attack state, counter will be incremented until it reaches the peak of the volume. When the volume reaches the peak, it moves to “Decay” state. During Decay state, the counter will be decremented until it reaches sustain level (sus_lev in diagram). When the counter hits sustain level, the state will transit to “Sustain” state. During Sustain state, counter does not change. When the note signal is turned off, it will become “Release” state, and counter decrements until it hits “0”. When it hits “0”, the state returns to “Note off” state.

Verilog description of state machine is easy. The output of the EG will be connected to one end of multiplier. Another end connects to the output from VCO. So the volume will be controlled by this generated envelope.

--

--