FM Synthesis with Dexed: A Quick Tour


Dexed is a free VST plugin that emulates (and acts as an interface for) the Yamaha DX7, the first commercial keyboard to use FM synthesis. The DX7 came out in 1983 and was a huge seller and was responsible for many of the iconic sounds of '80s electro-pop, but it was also an incredibly sophisticated synth engine.



The trouble with the DX7 was that it was notoriously unfriendly to programme. The presets sounded great but making your own sounds was perceived to be a hard slog, although I have to admit, the DX7 user manual does its best to help the reader and actually isn't bad at all. But maybe the skill sets for being in The Human League and reading a 72-page manual didn't overlap much.

In addition to the user guide, the nerds got hold of a copy of The Complete DX7 by Howard Massey; the real nerds also had FM Theory and Applications for Musicians by Musicians by John Chowning. Both can be found as PDFs online and are still worth seeking out, although Chowning's book is only really worth having if you enjoy lots of mathematics. The DX7 manual is easy to find too.

Dexed was originally intended to help DX7 owners to programme their synth. It has a sound engine that's capable of a very decent emulation of a real DX7, if that's what you're into, but it can also do anything else that can be done with any an FM synth of the same capabilities.

You can download Dexed here. You may want to grab the extra carts as well; this gives you about 3000 patches to experiment with, since reverse engineering other people's patches is a great way to learn any synth. I'm running it in SAVIHost, which is a very clean and simple way to do it, but you can also just drop it into your preferred DAW.

The trouble is, Dexed isn't particularly welcoming either. Here's what you're presented with when you open it:



While some of this will look familiar to anyone who's used a synth before, the workflow is far from clear. When you play around, the results are likely to be raspy and harsh, with random tweaking often yielding no sound at all.

This post contains some basics about making sounds with Dexed; the stuff you need to start getting a grip on it and make sounds you more or less intended to. I struggled to find a really basic guide to get me started so I thought this might help the next person. So this is not an intermediate or advanced tutorial, more of a day one orientation.

I promise there won't be anything that looks like an equation or a physics problem in here -- like everything else, I think it's usually better to get your hands dirty with some sounds and learn the theory afterwards (and only if you want to).

I'm also not going to discuss any history but if you'd like to hear some typical FM synth sounds from soon after the technique was invented I suggest Paul Lansky's gorgeous mild und leise:

or the more abrasive Stria by John Chowning, who wrote one of the books mentioned above:

With those sounds in our ears, let's get familiar with the Dexed interface and how the pieces fit together.

(Incidentally, Dexed doesn't support Scala tunings so you're stuck with sending MIDI pitch change messages in mono mode if you need something other than 12TET. Chowning's piece certainly seems to use some of this. Xen-FMTS may be a better choice for this but I haven't dug into that yet and the project's website is dead, so Dexed is probably a better choice for getting started.)

A final disclaimer: technically, the DX7 uses phase modulation, not frequency modulation. I'll ignore that distinction in this post.

The General Settings

To get started, fire up Dexed and look for this panel near the bottom left:



The dropdown list next to the STORE button contains the presets in the current cart. Flip through and few and play them to get an idea of the sounds available. If you click CART, you'll be able to load some different sounds. "Cart" here stands for "cartridge", the physical components that hold patches in ROM. You plugged one of these into the DX7 and it gave you 32 sounds:



The INIT button in the same panel clears the current settings and gives you a simple but nasty-sounding init patch.

Above the dropdown list and the STORE button are controls for the overall volume ("level") and transposition ("middle C") of the instrument, along with a switch to make it monophonic. Above that is a low pass filter ("cutoff" and "reso") along with an unrelated "tune" button that allows the overall pitch to be fine-tuned.

When experimenting, I advise keeping the "cutoff" on full and "reso" off -- that ensures the filter is wide open so you can hear the whole sound. To be honest, the filter on Dexed isn't great; you probably already have a better one you could run it into.

Looking to the right of this general settings panel we see three more panel that I'll discuss later: the all-important "algorithm", an LFO stage for vibrato and tremolo, and and additional pitch envelope stage. But we're initially going to look at the stuff above all that.

The Operators

Note: For this whole section, we're not going to do any FM synthesis at all. Instead we'll learn how Dexed's oscillators work. So read this part rapidly, play about but don't get bogged down as the real stuff only comes when we look at The Algorithm.

In FM jargon, an oscillator is called an "operator". Dexed has six, each of which lives in a little squarish rectangle with a number in its upper right corner, like this:



Notice that most of the interface is taken up by the six operators. Once you've made sense of one of them the others are all the same. To follow the tutorial, hit the INIT button and then use the switches next to the white numbers to turn off all the operators except number 1, so your init patch now looks like this:



When you play some notes, you'll discover this produces a pure, clear tone that is probably very familiar; each operator is, at its heart, a sine wave oscillator.

Each operator panel is divided into four sections that I'll call "Pitch", "Envelope", "Dynamics" and "Rate Scaling". The pitch section looks like this and, of course, controls the pitch of the oscillator:



The crucial thing here is the switch, which toggles the oscillator between a fixed pitch and tracking what you play on the keyboard. If you flip it to "fixed", it will play the same pitch no matter what note you hit. Use "coarse" to set the order of magnitude in Hz (1, 10, 100, 1000 etc) and then "fine" to pick out the exact pitch you want and "det" for ultra-fine tuning that's not really audible on its own but will be useful later. The little display above the knobs shows you the exact pitch that's being played.

Now flip the switch to "ratio". This makes the oscillator follow the note being played, which is usually what you want. Now "coarse" expresses a multiple of the pitch, from 0.5 (one octave down) through 1, 2, 3 etc (each pushing the note up an octave). It goes well up beyond the range of human hearing, which might not seem useful but it will be later.

The "fine" knob still fine-tunes this within the octave, but remember now we're multiplying the fundamental pitch (determined by the MIDI note) by that number. So 1.5 means multiply the frequency by 1.5, which gives a pitch a perfect fifth higher.

Now glance down and to the right to find the dynamics section:



This one is also pretty easy. The overall volume of this oscillator relative to the others is controlled by "level"; the velocity sensitivity is on "key vel" and the amount the tremolo effect (which I'll discuss later) affects this oscillator is controlled by "A mod sens". That's it!

Operator Envelope

Here's the operator's envelope section:



Each column of knobs is ADSR. The top knob indicates the level the envelope is supposed to reach during the attack, decay, sustain or release segment of the note. The bottom knob indicates how fast it travels from where it ended the last segment (or 0, at the start of the note) to this target level. The controls are all very interactive and it takes a while to get used to them; it's harder to give an explicit approach that always works as you could with a four-fader ASDR.

Here's one way to set things up. First, set Level 1 and 2 on full, Level 3 at noon and Level 4 all the way off. Now Rate 1 controls -- to an extent -- how fast the note rises to Level 1, i.e. the conventional "Attack" of the ADSR. Level 2 and Rate 2 work together to give a "Decay" effect; notice that they also have a knock-on effect on the attack time. Rate 3 is similar; it effectively gives you a second decay stage, taking you from Level 2 to Level 3.

Rate 4 controls how fast the note's volume goes to Level 4's level at the end -- since this is zero, Rate 4 is our old friend the Release of the ADSR. If you turn up Level 4, the note will die away to that level instead and then keep going indefinitely; this isn't very useful when we're listening to it but it will be later when we use the oscillator to modulate another sound.

FM envelopes definitely need some playing with before they become familiar, but they're not too difficult. I recommend staying with our single-operator version of the init patch and tweaking envelopes until the controls make at least a bit of sense.

Operator Scaling

The final section is perhaps the most cryptic-looking, but it's actually very straightforward. Remember that although we're currently only using one operator, we'll be using more shortly. It would be nice to be able to change the mixture of operators as we move up and down in pitch, to simulate the way acoustic instruments vary to change in timbre between their highest and lowest notes. That's what this section does.

These are probably best thought of as extra things to add to your FM synthesis toolkit once you've got the hang of the basics. So if you're eager to get on with some actual FM synthesis, feel free to skip this section and just leave it unchanged when editing the patch.



We will split the full range of the keyboard into two parts, which can be unequal; the "breakpoint" slider controls where this happens. The keyboard is then divided into a left side (lower notes) and a right side (higher notes).

The volume of the oscillator can be set to rise or fall as you ascend through each side independently. The "L curve" indicates the shape of the effect, with the default slope indicating the volume will rise as you ascend from the bottom of the keyboard to the breakpoint; "L depth" indicates how strongly the curve affects the volume. If you don't want any effect, turn "L depth" all the way down. Of course, "R curve" and "R depth" do the same thing for the notes to the right of the breakpoint. Note that the depth controls are very sensitive; turning them all the way up usually results in no sound at all anywhere in the keyboard's range.

The "rate scaling" knob is a whole different thing. If you turn this up, it will cause the envelope's four rates (set by the lower row of four knobs) to increase. There's no visial feedback for this as it happens separately for each note. The idea is that acoustic instruments tend to have slower-moving envelopes lower in their pitch range. Sadly, there's no way to have "negative rate scaling" -- the assumption, I suppose, was that people would mostly use the DX7 for emulating acoustic instruments.

The Algorithm Part 1: Carrier and Modulator

This is the heart of FM synthesis -- without the Algorithm, all you have is a bunch of sine wave oscillators, and I'm sure you have plenty of those already:



The "algorithm" knob chooses one of 32 different patterns of the numbers 1-6 in the grid display. Of course these numbers represent the six oscillators. We'll stick with algorithm 1 for now, but turn on operator 2 with its switch. The number 2 should light up on the grid:



The output is at the bottom of the screen; "modulation" flows downwards and the bottom row of boxes get mixed together in the normal way. If you now turn off Operator 1, no sound will come out because the operator that makes the sound is off. Operator 2 isn't "plugged into the mixer", it's modulating the currently-inert Operator 1.

Since we'll have to refer to specific operators a lot, let's adopt the notation Op1 for Operator 1, and so on.

In FM jargon, the bottom operator on each stack is a "carrier" and the ones above it are "operators". Earlier we were listening to a carrier with no modulator (Op1 only). If you try to listen to Op2 only you have a modulator but no carrier for it to modulate, and so no sound.

Turn up the level of Op2 and experiment with changing the pitch of Op2. What you're hearing is Op1's frequency being modulated by Op2. If Op2 were an LFO, you would hear a vibrato (pitch modulation) effect, but Op2 is in the audio range so instead you hear harmonics being added to the sound. This works even if the pitch of Op2 is well above the audio range. Try turning it up high -- even 32 octaves above the fundamental produces a very clear effect.

The harmonics added depend on the ratio between the frequencies of Op1 and Op2. If you just pick a whole number, you're modulating my a pitch one or more octaves away from the carrier, which produces results that retain the same pitch identity as the unmodulated carrier. For example, if Op1 is set to 1 and Op2 set to 2, you should get a sawtooth; move Op2 up to 3 and you'll get a square wave.

If your ratio has a fractional part, you're adding "inharmonic" information that will likely make your sound "gritty" or "discordant". As a general rule of thumb, choosing a ratio that can be expressed as a simple fraction -- such as 2.5, which is 5/2 -- produces reasonably consonant sounds, whereas arbitrary ratios like 2.3 -- which as a fraction is 23/10) are gnarlier. This web page contains a very good discussion of all this at exactly one more level of detail than I'm going for here. Incidentally, William Sethares has written some interesting stuff about how these ratios between harmonics might relate to consonance and dissonance in different tuning systems.

The two-operator setup on its own provides plenty of scope for FM synthesis. It's a good idea to sit with it for a while before moving on to more complicated setups. Try adjusting the envelopes and the scaling of either the carrier or modulator to see what different sounds you can get. For example, setting them to the same pitch but then detuning one produces beat frequencies. As you slowly increase the pitch, the beats get closer together until we hear them as forming a new, extra pitch: a harmonic.

Fixing the pitch of the carrier wasn't very interesting, but fixing the modulator is: you get something that sounds very much like ring modulation. Adjusting the level of the modulator down from the maximum will remove some of the raspiness that you may be getting tired of hearing.

The LFO Section

Now is a good moment to play with the section near the bottom right, which contains a pretty basic LFO:



On the left are the basic controls for the LFO: the waveform, speed (rate) and a "delay" parameter that lets you ramp up the LFO gradually starting from the note onset. On the right are the two things you can do with the LFO: PMD (pitch modulation, aka vibrato) and AMD (amplitude modulation, aka tremolo).

Turn up "PMD" and you increase the depth of the pitch modulation; turn up "PMD mod sens" to hear it. I admit I'm not really sure why we have two controls here as both together affect the depth of modulation. If either is set to zero, no modulation will be heard. This might have been a quirk of the original DX7; the manual is a bit ambiguous. You may very well want to attach LFOs directly to the pitches of individual oscillators, but this has to be done outside Dexed (Ableton Live, for example, makes it pretty easy). Per-operator pitch modulation was missing from the DX7 but is found in some later commercial FM synths.

The amplitude modulation is a bit more intuitive. Notice there is no "AMD mod sens" here -- that's because we have a separate one for each operator, called "A mod sens" in the Dexed interface. Of course, modulating the amplitude of a modulator such as Op2 in our setup causes its effect to fluctuate in strength over time, and this is rather a powerful effect.

For example, try setting Op2's frequency to 3 (i.e. two octaves above Op1) and then applying maximum amplitude modulation. The sound morphs smoothly between a square wave when Op2 is at maximum, and sine when its amplitude is at zero and so no modulation is happening:



Overall, though, the LFO section is nice to have but a bit underpowered. In a DAW you should be able to route more fully-featured LFOs into Dexed to get the same effects with a lot more flexibility, enabling you to create some nice, slowly-shifting textures. But the speed goes from pretty low to close to audio range (I guess about 15Hz?) so it's not bad.

The Algorithm Part 2: More Operators

Layering

One easy way to expand what we've been doing so far is to layer two or three versions of it together. This is just a matter of mixing. Turn on Op3 and Op4 and our algorithm will look like this:



Now we have Op2 modulating Op1, and also Op4 modulating Op3. These are two separate sounds that get mixed at the output (remember the output is the two carriers at the bottom, Op1 and Op3). This is just layering two synth sounds, something you're almost certainly already familiar with. In FM parlance, the two chains of modulator->carrier are sometimes referred to as "stacks", "strips" or "stripes" (we'll use "stacks" here).

Here's a patch using this idea but leveraging operator scaling to cross-fade between the two stacks so that lower pitches have a simple ratio of 2:1 for modulator (Op4) to carrier (Op3), whereas the higher pitches have a much messier ratio of 14.16:1 (Op2 to Op1). The two sounds are blended in the middle of the keyboard:



Feedback

Now let's pick algorithm 6 (using the "algorithm" knob on the right of the grid) and turn on Op5 and Op6. This gives us three voices, each made of one modulator going into one carrier, but something different is happening on the last one:



To hear what's happening, let's return to the init patch. Make sure the "feedback" control next to the algorithm grid is all the way off. Turn off all but Op1 and Op2 and set up a simple sound (but make sure Op2 is having some kind of effect!). Now copy the settings exactly into Op5 and Op6. Check they sound the same.

Now turn up the feedback control. What's happening is that some of the output of Op5, as well as going to the audio output, is being used to modulate Op6. This is just like the feedback control on a delay effect: it sends some of the output back around to the input. When feedback is high, you will often get what sounds like white noise, which can be rather useful. When it's lower, you'll get a variety of different modulation effects that are hard to achieve by other means.

Deeper Stacks

Let's re-initialize and pick alogirithm 3. We'll turn off Op4, Op5 and Op6. You should see we now have a three-storey stack with Op3 modulating Op2, which modulates the carrier Op1:



Instead of breaking out a calculus textbook, I recommend setting Op3's "A mod sens" high, and setting up the LFO to be slow and deep, like this -- the result fades the modulation from Op3 in and out, making its effect easy to hear:



Switch over to Op4, Op5 and Op6 to hear how a bit of feedback affects things; this time Op6 is just being fed back into itself, but the effect is still pretty noisy with the feedback control up a bit:



Envelope Interaction

If an operator is acting as a carrier, its envelope determines the volume of the sound in the usual way. If it's acting as a modulator, though, its envelope affects how the harmonic character it adds to the sound varies in intensity over time.

Here's an example patch with some envelopes. Op1, the carrier, has a quick attack that dies to nothing, like a piano. Op2 adds some harmonic colour to the whole note, but a lot more at the beginning. Finally, Op3 adds a lot of high-frequency information to the very beginning of the note, which acts like an impulse in a physical modelling synth.



A bit of amplitude modulation on Op2 can make for some nice shimmering movement in the note, too.

You're now in a position to explore all the algorithms. I suggest proceeding in the same way, starting with a very simple init patch and only a couple of operators turned on, then slowly adding elements making sure you can hear and, to some degree, understand the effect at each step. FM synthesis is no more technical than any other kind, it's just a different way of thinking that takes some time to get used to.

A final aside: my current main hardware synth, the Novation Peak, is a pretty capable at FM along with all the other things it can do. It only supports two algorithms: the single-stack-of-three and the same with feedback. But the Oxford oscillators and various additional features (noise as a modulator; ability to FM the filter frequency; ring modulation) it can do a lot in the FM space. Since learning Dexed I've often found myself making patches "FM first" rather than thinking additively and then adding FM like some kind of crackly frosting on top. As ever, the more tools you have in your box, the better.