Monosynth Envelopes and Oscillators (and how to do them right)


Envelope Generators (A.K.A. Transient Generators)

ADSR Basics

The most common type of envelope generator found in analogue monosynths is the very useful and versatile ADSR model. This allows a whole range of musically useful 'shapes' of synth sounds to be created. The name "ADSR" comes from the names of the four parameters:

A - Attack (Time), D - Decay (Time), S - Sustain (Level), R - Release (Time)

The Attack time is the length of time it takes an envelope generator output voltage to rise from 0 volts (with caveats...) to its peak value of say 5 or 10 volts (again, with caveats, more later...). The Decay time is the length of time it takes the output to fall from the peak value to the Sustain Level. Sustain is the level at which the output will remain for as long as you hold down a key. The Release time is the length of time it takes for the output to fall from the Sustain level and return to 0 volts.
Basic ADSR Envelope Shape

Example ADSR settings

Using these four parameters, you can create a multitude of useful envelope shapes which can be used for both imitation of natural acoustic instruments, and purely synthetic (though musically pleasing) sounds. For example:

Piano (A = 0 sec, D = 10 sec, S = 0, R = 150 ms).
This sound will rise to full volume almost instantaneously, which simulates the effect of the hammer hitting the string. The Sustain level is set to 0, so the sound will gradually decay from full volume to silence at a rate determined by the Decay Time. When the key is lifted, it quickly returns to 0 (silence) at a rate determined by the Release Time. This simulates the damper covering the string in a real piano. To further simulate a real piano, it would be necessary to make the Decay Time longer for low notes and shorter for high notes. It's unusual to be able to control Decay Time automatically in an analogue machine, but it is a very common feature in digital synths. I believe this was first introduced with the DX7, but I'm happy to be corrected on that.

Bowed String (A = 1 sec, D = 1 sec, S = 8, R = 500 ms).
This sound will fade in from silence to full volume over the course of one second. It will then take about a second to reduce from full volume to 80% (Sustain = 8), where it will stay for as long as the key is held on. Once the key is released, it returns to silence over the course of 500 ms. A very nice quirk of this shape is something that occurs when the player releases the key during the Attack phase. The envelope generator will immediately switch over to the Release phase, and return to silence at a rate determined by the Release Time. This gives a degree of 'touch sensitivity' to the sound; the shorter the duration of key press, the lower the volume that the envelope generator manages to reach within the Attack phase. For a great example of this effect, listen to "Village Ghetto Land" by Stevie Wonder.

Explaining Different ADSR Envelope Generator Behaviours

A Simple Electronic Explanation of How Envelopes Work

An Attack-Decay-Sustain-Release (ADSR) envelope generator is a very simple analogue resistor-capacitor (RC) charge / discharge device which produces transient voltage shapes for controlling analogue synthesizers. Here is an extremely simplified view of it (which omits buffers, amplifiers, attenuators, PSU, etc).

ADSR RC Timings

The output voltage (Vout) changes over time dependent upon the value of the input voltage (Vin) and the value of the envelope resistor (Re). The envelope capacitor (Ce) is a fixed-value capacitor which works with the varying values of Re to produce smooth, exponential voltage curves during the Attack, Decay and Release phases of the envelope cycle.

Normally, an envelope's Vout would be sitting at 0V, and would be waiting for a key press ("gate on"). On receipt of a gate on signal, the envelope generator moves into the Attack phase of the envelope. A large voltage is applied to Vin, and Re is set to the Attack time, Ra.

The reason for Va to be so high is that a purely exponential Attack just sounds odd, and unmusical. By using the lower 2/3rds of the Attack exponential curve, it becomes more linear and musically pleasing. Decay and Release curves sound best when they are simple exponential discharges, however.

Anyhow, moving along, if we should release a key during the Attack phase, then Re will change to the value of Rr, and Vin will become 0V. Capacitor Ce will follow an exponential discharge curve back down to 0V at a rate determined by Rr.

It's interesting to note at this point that the MiniMoog shared the same resistance value for Rd (Decay Rate) and Rr (Release Rate) – the single control marked 'Decay' in each envelope generator. The exception to this rule was when you had the 'Release' switch (to the left of the keyboard) set to 'Off', in which case Rr became zero, and notes would finish immediately once you lifted your finger from the keyboard).

Anyhow, moving along, if you lift your finger on the keyboard long enough for Vout to become greater than or equal to the Decay Phase switchover voltage (10V in our example), then the envelope generator would move into the Decay/Sustain Phase. At this point, Vin becomes equal to the Sustain Level (Vs), and the envelope resistance becomes equal to Rd (Decay Rate). So, in most cases, the envelope capacitor would start an exponential discharge process from Vd down towards Vs, at a rate determined by decay resistance Rd. Eventually, Vout will be so close to Vs, that you could say it had reached the Sustain Phase. Vout will remain steady at Vs until the key is released.

A quirk of the MiniMoog is that the envelope generators couldn't tell when a new note was played on the keyboard whilst the original note was still being held (i.e. playing legato). The oscillators would move to the new note value (the lowest note had priority), but the envelopes would be oblivious to this. (This was not the case in other synths, as we will see, later).

If the Gate signal went to Off during the Decay/Sustain Phase, then the envelope generator enters the Release phase. Re would become set to Rr, and Vin would become set to 0V. This would cause Ce to discharge to 0V at a rate determined by Rr.

Now here's the interesting thing - perhaps THE MOST IMPORTANT THING YOU WILL EVER LEARN about (proper) envelope generators: If an EG is in its Release Phase, but it hasn't reached 0V yet (i.e. the filter is still going "bzzzzzzaaaaeeeeoooowwww" or the amplitude envelope is still sounding), AND if you then press a new key at that point (Gate On), then you go back into the Attack Phase, but with an initial value which is NOT ZERO, but the current value of Vout.

That's it: You've discovered the secret of the universe!

There are a few subtleties, but in essence that is all you have to know: The charge on the envelope capacitor does not Reset To Zero (RTZ) if you go into the Attack phase during an incomplete Release phase. Now, don't get me wrong – I know a LOT of synths (especially virtual analogues and analogues with digital envelopes) DO in fact perform a RTZ on the capacitor (real or virtual) on every new key event. But they are doing it wrong if it's a monosynth.

Consider the following Finite State Machines (FSMs):

Number 1 - The traditional MiniMoog response (or SH-101 in GATE-only mode):

MiniMoog Envelopes

Number 2 - The Roland SH-101 (GATE+TRIG) or ARP Odyssey Response:

SH-101 Envelopes

The subtle difference here is that when a new note is played, whilst still holding the original note (i.e. legato trills, etc), then the state machine re-enters the Attack Phase, with Re = Ra, and Vin = Va. This is the reason why the ARP Odyssey was considered superior (i.e. more responsive) for fast keyboard solos over the MiniMoog.

Now, it is time to shield your eyes, for we are about to reveal the spawn of Satan: The monosynth with a Reset To Zero response in the Attack Phase.

Remember: What has been seen cannot be un-seen!

Number 3 - The Korg Prophecy Response (Return To Zero):

Korg Prophecy Envelopes

On first impressions, this looks very similar to the MiniMoog response. And in fact, the first note you play would behave very similarly to a MiniMoog, too. Things get ugly however, if you take your fingers off all keys and the envelope goes into a nice long release phase. What happens if you press a new key?

BLAMMO!

The envelope capacitor is discharged to 0V before anything else
. If this was controlling a Voltage Controlled Amplifier, your nice release phase would be stopped dead in its tracks (possibly accompanied with a big old 'thump' or 'click' if the waveform being amplified wasn't at a zero-crossing point: i.e. pretty much every time). The Attack Phase for the newly pressed key starts right back at 0V, rather than gently rising from the point you had reached on the Release Phase.

Now, I can understand the reasons for implementing an RTZ response in a polysynth voice's envelopes. Due to voice cycling, other voices can still be performing their Release Phase whilst a new voice starts its envelope cleanly from a guaranteed initial state. I GET that.

However, if you're designing envelope generators for a monosynth (or even a mono mode on a polysynth), then RTZ should only ever be an option. An option, moreover, which should be switched OFF by default.


Voltage-Controlled Oscillators (VCOs)

A Monosynth's VCO(s)


The Voltage-Controlled Oscillators in a monosynth are the source of pitched waveforms which form the basis of a musical sounds. A tuning system known as Volt-Per-Octave means that for every volt increase at the VCO input, the output frequency will double (a musical interval of one octave). Therefore, the keyboard of a monosynth should output a voltage which increases by 1/12 of a volt for every semitone. The keyboards on old monosynths would have two outputs: Control Voltage (CV) and Gate.

Gate can take two forms, depending on the manufacturer. The most common is for a positive voltage to be present whenever a key is pressed, and zero volts when keys are released. Other manufacturers (notably Moog), use a system known as "S-Trig". This means that the input to the Envelope Generator(s) is in the form of a switch. When a key is pressed, the switch closes and the EG is triggered. When the key is released, the switch opens again and the EG switches to its Release phase. You can convert a "Pulse Gate" to an "S-Trig" using a relay or transistor circuit.

Keyboard CV Out will track either the lowest note played (Low Note Priority) or the highest (High Note Priority). There is a circuit called "Sample and Hold", which reads the value of the keyboard CV whenever the Gate signal turns on, and holds that value (in a capacitor) whenever the Gate turns off (i.e. when all keys are released). This ensures that the oscillators will still be generating the same keyboard pitch, even after the last key has been released. This is essential to ensure that last keyboard pitch continues to sound during the Release phase of the volume envelope.

It's important to remember that even when the output of a monosynth is silent, the VCOs will still be oscillating at the frequency dictated by the most reecent key pressed. This isn't immediately obvious on synths with just one VCO. However, if you have two VCOs, with fine detune between them, then they will be continually 'beating' against each other, which sounds a bit like a phaser pedal. If two VCOs are separated in frequency by 0.1 Hz, then the cycle of this phasing sound will be 10 seconds in duration. If you play the same note on the keyboard with a square, organ-like envelope, then you will hear the oscillators on a different part of that overall cycle every time you press a new note. In addition, your brain 'keeps track' of where the oscillators are within the cycle, so you build up an expectation of where you will be when you next press a key.

Now, it's "no bother" for an analogue monosynth to have the VCOs running all the time (even when the synth output is silent). However, in a soft-synth, it is easy to see how this could be considered very inefficient (from a programmer's point of view). If a programmer decided that whenever a soft-synth voice was silent, then they would stop the 'virtual oscillator' subroutine from being executed. In this situation, the programmer has three choices when restarting the virtual oscillator:

1 - Restart the oscillator from the point in its cycle when it was stopped.
2 - Restart the oscillator at a fixed point in its cycle.
3 - Restart the oscillator at a random point in its cycle.

With option 1, you would hear something similar to the "pure analogue" situation described above: That is, each new note would sound in a consecutive segment of the overall "beat" phase cycle. The only difference would be that with an organ-style envelope, the beat cycle would not advance while the output was silent, so the oscillator output will fall out of sync with your 'internal' cycle.

Option 2 is quite a different kettle of fish: Every time a new note sounds, it would pick up its beat phase cycle at exactly the same point for every note. This would lead to every note sounding the same, eliminating the sense of movement that is so desireable.

Option 3 breaks the monotony of Option 2, but sounds far less satisfying than being able to track the beat phase cycle inside your head.

From what I can tell, the Arturia MiniMoog VST operates in the "pure analogue" fashion, i.e. The virtual oscillators continue to run in the background, even when the overall output signal is silent. It would appear that the original Arturia Modular V used the Option 3 approach, restarting all oscillators from a new random point with every new note on event. However, all credit to the Arturia team, they have made the latest version (V3) behave correctly for oscillators and envelope generators. It's a completely different creature now!


E-Mail Grant