How to shape your sounds with envelope generators.
Every synthesizer, even the most primitive, has at least one envelope generator. Most have two or more. If you’re putting together your own hardware modular system, you could certainly have an instrument with no envelope generators, but it wouldn’t be much use. (You could use a ribbon controller to start and stop notes, but that’s a topic for another time.)
Last month’s column was about control signals. Any synth has several possible sources of control signals, notably LFOs (low-frequency oscillators), envelope generators, step sequencers, and the inputs coming from a MIDI keyboard. All four are useful, and I may be forgetting a few others. But while you could have a synth without an LFO, without a step sequencer, or without a MIDI input, you really do need a couple of envelope generators to manage the shapes of notes.
An envelope generator (EG, for short) produces a control signal called an envelope, which rises and falls in some manner. The signal is a contour—a shape. For this reason, EGs are sometimes called contour generators. Normally the envelope is a non-repeating signal. It has a beginning, a middle, and an end. It’s true that some envelope generators have a button with which the EG can be made to loop endlessly, but in that situation, the module is functioning as an LFO, not as an envelope generator.
The Humble ADSR
If you’ve spent more than five minutes with a synthesizer, you’ve probably heard or seen the term ADSR. This is by far the most common type of envelope generator (see Figure 1). By talking about it first, before we dig deeper into the concepts, we’ll be able to clarify a few useful concepts.
An ADSR envelope is often used to control the loudness of individual notes. In a standard synth, a second ADSR will probably be available to control the filter’s cutoff frequency.
The four letters stand for attack, decay, sustain, and release. You’ll find knobs (or parameters with these names) on any ADSR. A composer named Vladimir Ussachevsky suggested this type of module to Bob Moog back in the 1960s, and it turned out to be incredibly useful. Ussachevsky observed that most musical notes have an attack segment during which there is movement in the sound; then settle down to a sustaining sound; and finally die out, quickly or slowly, when the note ends. The ADSR allows us to create control signals with this shape.
The segments of the envelope (the attack, decay, sustain, and release) are sometimes referred to as stages.
When the ADSR is not active, its output is zero. When it receives a gate signal (see below for more on gates), the envelope rises from zero to some maximum value. The attack parameter controls how quickly it rises. The envelope then proceeds to fall toward the sustain level at a speed determined by the decay parameter. Once the decay segment ends, the envelope stays at the sustain level, remaining static, until the gate signal goes away. When the gate ends, the release parameter determines how quickly the ADSR’s output envelope falls back to zero.
As simple as the idea seems, you should be aware of a few subtle points.
First, the sustain parameter is a level parameter, while the other three parameters are time or rateparameters. (There’s a subtle difference between time and rate, as explained below.) If the sustain is set at 100%, the decay parameter will have nothing to do: When the attack segment is finished, the envelope will simply stay at its maximum level until the release starts. Second, if the gate input falls back to zero before the attack and decay segments are finished, the sustain level is irrelevant; when the gate ends, the envelope will proceed directly to the release segment. Third, if the sustain level is zero and the gate remains open for long enough that the attack and decay segments are complete, then the release setting will be irrelevant; the envelope will already have ended, so the release segment will have nothing to do.
If the envelope is retriggered before it ends, more complex shapes may be heard. For more on triggers, see below. There are many types of envelope generators other than ADSRs. Below, and in the video, we’ll look at a few of them.
FYI, a time parameter and a rate parameter do exactly the same thing, but the settings aren’t the same. Let’s assume that the parameter can be set from 0 to 99. If the envelope parameters govern time, we would expect 0 to be an almost instantaneous time and a setting of 99 to be the maximum time the module is capable of. However, if the parameter is called a rate, we would expect 99 to be a very quick, almost instantaneous rate, while a rate of 0 would be very long—perhaps even infinitely long.
Gates vs. Triggers
In order to get the EG to produce a contour, we have to tell it when to start. That’s where the picture gets interesting.
In a modular synth such as the VCV Rack system I’m using for the video examples in this column, an envelope generator responds by starting a new envelope when it receives a voltage with a rising edge. (Don’t forget, in VCV and other computer-based instruments, the signal isn’t a real analog voltage, but it acts as if it were, so we can easily talk about it using concepts from analog synthesis. Rising edge is such a concept.) The EG has an input labeled trigger or gate. When the signal at this input is zero, nothing is happening; unless the EG happens to have an offset parameter (and that’s not the usual situation), the output will be zero. But when the incoming gate/trigger signal suddenly rises to +5 or perhaps +10, the EG starts producing a new envelope.
What happens next depends on whether the EG is expecting to receive triggers or gates. A trigger is a momentary signal. It tells the EG to start, and what happens at the input after that doesn’t matter; the EG just does its thing, running through whatever stages it has, and when it gets to the end, it stops.
Technically, what I just said isn’t quite true. If the EG is busy creating an envelope and it receives a new trigger, it may (or may not) start over. There may be a switch with which you can control what happens in that situation. On the Nysthi DAHD that’s included in this month’s VCV patch, that switch is labeled Zero. If the Zero switch is active, the envelope will jump back to zero on a new trigger and start over, no matter where it is. But as long as there’s no new rising edge trigger at the trigger input, the envelope goes on its merry way. Whether the trigger signal has a high value for 1ms (millisecond) or remains high for five seconds doesn’t matter.
When I say that the EG stops when it reaches its end, I mean essentially that its output falls back to zero. The EG’s output will be zero except when it’s actively producing an envelope. This is not true of a few modules, but for purposes of discussion, we can safely ignore them.
Some EGs, however, expect to receive a gate, not a trigger. This is a very important distinction; if you don’t understand it, you’ll have trouble working with envelope generators. An EG that wants to receive gate signals will start producing its envelope when it receives a rising edge at the gate input, exactly as if the gate were a brief trigger. But what happens after that will be radically different.
The gate-oriented EG will go through a certain portion of its envelope and then, if the gate is still high, it will “hang” at some output value or other, depending on how you’ve turned the knobs (or equivalent parameters) on the EG. The envelope will continue to its end only when the gate signal falls back to zero. Again, Figure 1 shows this.
If you send a trigger to an EG that wants to see a gate, it will respond to the trigger as if it were a very short gate. If the attack parameter is set to an instantaneous attack, you’ll get a response from the EG; it will produce, in effect, an attack-decay (AD) envelope, as shown in Figure 2. But if the attack is a bit slower, the result may be imperceptible. You’ll get only a slight rise and fall, almost as if the EG weren’t doing anything.
Both types of EGs are useful. If you’re synthesizing drums or other percussive sounds, you probably don’t care what happens if the gate signal stays high for a while; the drum sound will play briefly and then stop. For drum synthesis, a trigger-based EG will work just fine. But if you’re playing sustaining sounds, such as a lead synth tone, you need EGs that respond to gate signals.
Many envelope generators are enhanced by the addition of one or more extra segments.
In addition to the ADSR configuration, you may find a delay parameter. This makes the EG a DADSR. When a gate is received, the envelope will wait for a length of time determined by the delay parameter before it progresses to the attack stage.
Between the attack and decay segments, you might find a hold segment. When the attack is finished, the envelope will stay at its high value for a length of time determined by the hold parameter before proceeding to the decay. This would make the EG an AHDSR. Obviously, if we combine these two ideas, we have a DAHDSR (see Figure 3).
You might also find an EG that has two decay segments and a breakpoint parameter. When the attack is finished, the envelope falls to the breakpoint, which is a level parameter, at the speed controlled by decay 1, and then rises or falls to the sustain level at a speed controlled by decay 2. Some envelope generators have multiple attack stages, multiple release stages, and sustain decay parameters. If an envelope has a sustain decay, the sustain stage won’t be static; it will rise or fall, usually at a slow rate. This is useful if you’re trying to synthesize a piano-type sound, which does sustain but also fades out slowly even if the MIDI key (or the sustain pedal) is holding the gate at a high level.
Sometimes you’ll see other combinations of level and time/rate parameters. As long as you check the manual to find out which parameters control the levels and which control the speeds of the moving segments, you should be fine.
But wait, there’s more! When an envelope is progressing from one level to the next (such as, perhaps, from zero at the start of the envelope up to the maximum output value at the end of the attack), it doesn’t have to move in a straight line. Many envelope generators have curve parameters, with which you can give the segment a concave or convex shape (see Figure 4). With a rising segment such as the attack, a concave curve will cause the rising envelope to start moving slowly and then speed up as it approaches its final value. A convex curve does just the opposite, rising quickly at first and then slowing down as it nears the final value. A concave curve is also called exponential, and a convex curve is also called logarithmic.
Envelope generators can do many useful things. The vibrato rate coming from an LFO might speed up or slow down during the course of each note if the rate is controlled by an envelope. An EG could control an oscillator’s waveform, or if the envelope signal is routed to the panpot in the mixer, it could sweep the sound of each note from one side of the stereo field to the other.
Also, the envelope segments themselves can be modulated, usually by key velocity or a slow LFO, so they’re longer or shorter from one note to the next. When you’re trying to make your music sound more expressive, envelope generators are possibly the most potent resource at your command—except for maybe your brain.
The patch available for download with this month’s column uses third-party modules from mscHack, Bogaudio, AS, Alikins, Befaco, Impromptu Modular, Valley, and Nysthi. When you press the Run button on the Impromptu Clocked module, you’ll hear a six-note sequence in which the Nysthi DAHD is triggered twice per note while the Befaco Rampage adds a quick pitch envelope to only half of the notes.