Tuesday, September 14, 2010

What is Pulse Width Modulation?


Earlier this year, I put together a modest, multi-part series of posts called Synthesis Made Simple aimed at helping the total noob learn some of the basics of programming his or her own sounds. I purposely left out some of the more advanced concepts in the interest of not making it completely overwhelming, so I thought I'd take the opportunity today to discuss one of those concepts that can be insanely useful: pulse width modulation.

Not every synth will offer pulse width modulation, although with the popularity of PWM sounds in trance, most modern virtual analogs and softsynths do. You'll recall in our discussion of modulation, that modulation is simply the act of changing some aspect of your sound in real time. So what about the 'pulse width' aspect of PWM? You may have heard square waves interchangeably referred to as 'pulse waves' before. This is because if you look at the severe up and down peaks in a squarewave, it has the appearance of a pulsing sound. The distance in between those peaks is called a 'duty cycle'. By changing (modulating) the duty cycle, we can alter the sound of the waveform as it goes from wide, retangular shapes to narrow, skyscraper-like shapes. Thus, pulse width modulation is the alteration of the duty cycle of your waveform for the purposes of changing the basic timbre of that waveform. Note that although some modern synths allow pulse width modulation of other types of waveforms, it is far more usual to only see this option available on the pulse/squarewave.

Let's explore this a bit and see what we can do with it, shall we? Go ahead and fire up your DAW of choice and call up an instance of TAL Bassline. (If you don't already have it, it's free and available here.) Bassline emulates the architecture of the Roland SH-101, a very popular monosynth in the 80's.

1. The first thing to do is to isolate our pulse wave, so go to the SOURCE MIXER and turn down the sliders for the SAW and SUB OSC. If you play a few keys, you should hear the familiar hollow timbre of the pulse wave.

2. If you look next door in the VCO section, you will see a slider marked PULSE WIDTH. Go ahead and play some notes as you fiddle with this slider. As you push the slider upwards, you should hear the timbre change from the hollow square wave to something a bit more biting and nasal. You can probably already see some applications for this in emulating sounds like oboe, harpsichord, or even the buzzing of a gnat. But this is missing out on some of the more interesting stuff you can do with PWM when you assign a modulator to change that pulse width in real time.

3. You'll notice that next to that PULSE WIDTH slider is a menu that defaults to MAN for manual. This means that you can only change the pulse width by fiddling with the slider. Go ahead and change that to LFO (check here if you need to read up on what an LFO is). If you play a few notes now, it probably sounds pretty dissonant an unpleasant, so let's dial in some more subtle settings. Head over to the MODULATOR section (which is what Roland referred to the LFO as back then) and turn down the RATE slider to about 25%. Also, change the WAVE FORM to TRI. If you play a few notes now, you should hear a rather warm, fatter sounding timbre being produced. This is one of the cool things about PWM and why it was so common on early synths that might only offer a single oscillator. By using PWM, even single oscillator synths like the 101 could output thicker, fatter sounds. This, along with unison modes, is the basis for most of those giant sounding trance leads the kids love so much.

4. Of course, you're not just limited to using the LFO to modulate pulse width. Try going back to the VCO section and changing the modulator from LFO to ENV. This will allow you to modulate the pulse width using the ENVelope generator (read up on envelopes here). By altering the Attack and Decay of the envelope, you can simulate the way a plucked sound operates in the real world with a brighter attack portion settling into a more mellow decay or sustain. This can be useful in emulating instruments like guitars, or retro sounding 70's leads.

As you can imagine, when you get to more complex synths that offer multiple oscillators, the sounds you can make using PWM get even bigger, warmer, and more impressive and you can even use different methods for modulating the pulse width on each oscillator. Try experimenting with something simple like Bassline first, though. Once you've got a handle on that, try tackling it on a more advanced synth and see where it takes you!

2 comments:

Anonymous said...

Excellent post.
You've cleared this up for!

I've posted it on my blog

tutorials for Native Instruments Massive

http://www.massivesynth.com

Tom said...

Thanks for the link, Anon!