Monday, February 15, 2010

Synthesis Made Simple Part 8: The Envelope, Please

In the previous post, I described a scenario in which you adjust the volume of your car radio as you’re driving to make it louder when a song you like comes on or to make it quieter when you get a ring on your cell phone. Nothing we probably haven't all done before, but all that fiddling about can be a bit distracting while you’re driving. Wouldn’t it be great if you had a little robot friend that could automatically adjust the volume knob for you? In a sense, that’s exactly what MODULATORS do - they automatically change whatever parameters they're assigned to, leaving your hands free to play. The most common type of modulator in the synth world is what is called an ENVELOPE.


An envelope is used to perform one time, non-repeating modulations to a sound that occur over a period of time. I don’t mean to keep bringing up the example of plucking a note on a guitar, but it really is a great example for explaining a lot of concepts of synthesis. So imagine you pluck a note. Over time it goes from a bright, loud initial pluck (the ATTACK) fading down (the DECAY) to a mellower sustaining portion (the SUSTAIN), until it eventually fades out (the RELEASE). This type of modulation is what envelopes are designed for. Think of an envelope like a mini timeline that allows you to define changes to a parameter over the course of the time you hold a note.


The most common type of envelope you’ll find on synths is called an ADSR envelope. The name refers to the portions of the sound I just mentioned above. For the sake of introducing you to envelopes, I’m going to be talking about using an ADSR envelope to modulate the volume or amplitude of a sound. Virtually every synth that ever existed at the very least has an envelope dedicated to modulating the amplitude of your sound. Often, they can do much more than that, but let’s not get ahead of ourselves.


When you first play a note, you are triggering the ATTACK portion of the sound. Not all sounds start the exact moment you begin playing. Sure, if you play a piano or organ, the sound begins the moment you press the key. But sounds like flutes or strings actually “fade” in a bit. It takes time for them to reach the maximum volume. Thus, a sound that starts instantaneously would have the lowest attack value possible, whereas a sound that fades in like strings or a synth pad, would have a higher attack value.


Most real world sounds don’t maintain the same volume level from start to finish. Instead, after the initial attack, the sound tends to drop down in volume a bit. The time it takes for the sound to go from that initial louder attack to the quieter SUSTAIN (more on that in a second), is what is known as the DECAY time.  A low decay value would very quickly move on to the sustain portion (great for synth bass sounds), whereas a higher decay value might take longer to reach it (like a piano).


Unlike attack or decay, which are time values, the SUSTAIN level is an amount level. If we’re talking about an AMPLITUDE ENVELOPE, the sustain level is the volume a note eventually settles on after the initial attack decays down.  In general, a higher value will be useful for infinitely sustaining sounds like pads, where a level of zero wouldn't sustain at all.


Finally, we have the RELEASE portion of the envelope. Put simply, this is the time it takes for the sound to fade out after you’ve released the key. If you play an organ, the sound cuts off immediately after you let go of a key. On the other hand, if you play a note on an acoustic piano, the sound gradually fades out after you let go as the vibration of the strings and the body of the piano die out. Thus, a low release value will end the note close to the time you release the key, whereas a longer release will take time to fade out. In addition to being useful for simulating the way real instruments operate, longer release values can be useful for creating more atmospheric sounds, as it can very simplistically emulate reverb.


So envelopes can be useful for shaping the volume of a sound throughout the time you hold a key. But they aren’t limited to just this. Even the simplest monosynth generally allows you to use an envelope to modulate the filter cutoff as well. In fact, this is so common, that you’ll probably remember I mentioned that most filters have a dedicated parameter for determining what influence the envelope has on the cutoff. Using envelopes to modulate the cutoff lets you emulate the bright initial attack of a sound and the drop off that usually follows. Or to imitate the swell of an ocean wave. Basically, any time you need the frequency content of your sound (the bright/dark level) to change over time, a filter envelope is there to serve you.


Another common thing envelopes are used to modulate is oscillator pitch. Some acoustic sounds, like a trumpet, have an initial ‘blip’ in the pitch at the attack portion of the sound before it settles to the note you’re playing. This happens extremely quickly, but it has a great effect in how each note sounds. Or, take a sound like the classic 808 kick drum. It starts at a higher pitch, and slowly drops down to get that classic ‘DOOOOOOOOoooooooong’ sound.  Most modern synths will allow you to modulate pitch with an envelope, but this is a bit rarer on older ones.


So, what if I want to use an envelope to modulate more than one of these parameters at once, but I don’t want them to all modulate in the same way or at the same speed? Fortunately, most synths are equipped with more than a single envelope. So you could have a different envelope for your pitch, your filter cutoff, AND your amplitude. Not ALL synths allow this, but most at least have separate envelopes available to modulate the amplitude and filter cutoff separately. Thus, you can have a sound that starts playing the moment you press the key (via the amplitude envelope), but that goes from dark to bright (the filter envelope) as you play it.


So envelopes are clearly very useful to create modulations that only occur once (some synths DO allow you to loop an envelope, but this is relatively rare). What if you want a modulation that repeats regularly? Think of a cello player who plays a note and adds some vibrato to the note as it sustains. Vibrato is a repeating pitch modulation. This sort of effect is the domain of the LFO which we'll talk about next time!

3 comments:

Anonymous said...

Thank you this was very clear (:

keep up the good work

mail said...

thank you so much for posting this, you don't know what it means to an aspiring musician like myself to know that someone as accomplished as you still takes the time to share your knowledge. it is appreciated!

There's one thing I've never understood about envelopes: what is the relationship between the envelope shape and the "set" position of the unmodulated value? For example, you can set the level of the AMP to a set volume. When you add the modulation envelope, does it attack from zero up to the "set" volume, then decay to sustain, and release to zero?

or does the sustain value "override" the "set" value as if it was never there?

Same question for the filter, what does changing the cutoff value do to the envelope and how does it relate to things like the sustain level?

I look forward to finishing this series, thanks again for publishing it!

www.soria-3d.com said...

Wow, there is really much useful data here!