First of all, hang onto your seats, this is a long ride but an important one.
We’ve all heard people describe harmonic distortion (HD) as if it has something to do with harmonics in the musical sense. In other words, even harmonics sound like this, odd harmonics sound like that, but always something to do with the harmonic series. Something pure, musical, timbral. But that’s simply untrue for all but the most simple sounds: a sine wave, a breathless flute, a pure bass tone, all by itself. Any realistically complex musical recording will not reveal to you the sweet overtones you desire. Instead, you’ll get muddled fuzz. After all, that’s what distortion is anyway, isn’t it?
The most simple type of distortion to understand is a “transfer function,” meaning for any specific value (or voltage) you put in, you have a system that always outputs the same output. Maybe 0 stays 0, but 0.5 becomes 0.4. Repeat that for any possible input/output combination, and you could draw a chart to show what happens to a waveform when you put it in. There is an analog reality that you can measure, and in the digital realm, we write algorithms or equations to mimic that exact same shape as closely as possible (or we make something unique). Either way, for a pure sine wave, distortion in the output shape can be described as a sum of mathematically “harmonic” frequencies above the frequencies input shape: 1x the frequency, 2x, 3x, etc. We measure this by putting in a pure sine wave and getting the output. A brute force way to copy an analog shape would be to manually add (or subtract) these frequencies in raw math. But the point is, a given transformation of the waveform can be described in this way. That is what is meant by the term “harmonic.” For the math nerds out there, this would be the Taylor Series understanding of the problem. These are the musical harmonics we think of when we describe the timbre of an instrument, the relationship between notes in a scale and that timbre (spectral composition), and what is almost always invoked when musicians or engineers talk about HD: pure multiples of the input frequencies. In other words we hear pitch multiplicatively, this is musical and described in musical terms: 100 gives 200 (octave), 300 (octave fifth), etc. OK, we’ve got the single sine wave case sussed out.
Let’s talk about intermodulation distortion (IMD). The reality is that with multiple frequencies headed into a nonlinearity, there is no HD without IMD. The two are bound together by the math, inseparable, yin and yang, energy and matter. It’s important to understand when I say “math,” this is not some kind of DSP thing only. I’m talking analog too. The same measurements and same phenomena exist in the analog world, and engineers used the same math to design their systems for linearity (the lack of distortion), in order to help pick components and design circuits. So before anybody comes around here talking about how digital distortion is a simple failing to get analog emulation correct, you’re just plain wrong. The real difference in that department is a third digital-only type, aliasing distortion, which is a topic for a different conversation.
You’ve probably seen IMD measurements as well. They are also simple: industry standard combinations of two sine waves (usually) are run through the system, and the output is measured to get the level of distortion by summing up energy in frequencies not present in the input. In any distorted system, you also get energy in sum and difference tones between the frequencies and their multiples! I will repeat: this is inseparable from HD. It is simply a fact of what happens when you distort a waveform. The issue here is that sum and differences are only musical by chance. Offsets are in cents from the nearest named 5-limit just-intonation note in the C4 chromatic scale. I am choosing just intonation here because it is grounded firmly in the real harmonic series, and therefore is talking about actual harmonically related pitches. It also provides the best possible case for IMD difference tones analytically.
| Interval | Note | Sum | Offset | Diff | Offset |
|---|---|---|---|---|---|
| Min 2nd | C# | C#5 | -55 | C#0 | 0 |
| Maj 2nd | D | C#5 | -7 | C1 | 0 |
| Min 3rd | D# | D5 | -39 | G#1 | 0 |
| Maj 3rd | E | D5 | 0 | C2 | 0 |
| 4th | F | D#5 | -49 | F2 | 0 |
| Tritone | F# | D#5 | 5 | G#2 | 27 |
| 5th | G | E5 | 0 | C3 | 0 |
| Min 6th | G# | F5 | -44 | D#3 | 0 |
| Maj 6th | A | F5 | 0 | F3 | 0 |
| Min 7th | A# | F#5 | -22 | G#3 | -49 |
| Maj 7th | B | F#5 | 38 | A#3 | -27 |
| Octave | C | G5 | 0 | C4 | 0 |
Let’s talk about this table. First of all, the sums are all higher notes, just like HD. But a lot of them are off, and in the worst way: imperfect half and quarter tones. The Maj second is sorta close, and the tritone is a little closer, because they are already harmonically related to begin with, but let’s talk about the zeroes in this column: the octave, Maj 3rd, 5th, 6th. The Maj 3rd adds a perfect D. Not bad: you have a 9th chord lurking in there. The perfect fifth adds a Maj 3rd. Nice. The Maj 6th, it adds a fourth. These are musical, but not like the harmonic series: the energy they are adding is much more likely to be close to the frequencies in the original signal! Also, do these pitches look familiar to you? That’s because they’re the intervals most commonly stacked in guitar chords in — you guessed it — genres with heavily distorted guitar. It’s no coincidence those sound awesome, because the IMD is musically related to what goes in! I’m just trying to show you that this phenomenon is not digital only, is not a modern phenomenon, and is exploited intuitively by both musicians and engineers alike.
Second, the differences are all below. The case is a lot better in terms of tuning, but you’re adding a lot of mud in the bass. In fact, close intervals can produce very low difference products, while wider intervals produce larger difference frequencies and higher sum products. In dense musical material, this accumulates in the lows and mids. I’m only showing you intervals within one octave! But even if you ignore all that, these pitches aren’t necessarily part of the timbre, the harmonic series, above the original frequencies. All this is discounting that I’m only showing you pure sine waves here: any inharmonic noise like drums, percussion, not perfectly pure flute-like instruments, etc. have a bunch of inharmonic frequencies already that will birth crazy IMD frequencies.
And then, there’s the volume. For nonlinear distortion, intermodulation components are often louder than harmonic ones. The exceptions are extreme wave folders driven pretty high… but they still do not eliminate IMD and just change IMD’s relationship to HD. They also do not sound anything like the kind of “harmonics” that are evoked in harmonic distortion discussions online about sweetness and purity. I can show you the math, but I did a talk about this at ADC that I will post as soon as it’s released, and you can see that for only two or three unique notes at similar volume, even an individual IMD component is often louder than the harmonic components. And the more tones you add, the worse it becomes summed up, instantly enveloping simple harmonics.
But, I don’t even need to tell you all this. There are some practical thoughts that will tell you all you need to know. First of all, if you could make pure harmonic distortion, then a time-aware (non-varispeed) octaver would be dead simple and sound perfect. 2nd order harmonic distortion, done. Guess what? That doesn’t work. Why? IMD. Put three sine waves of different notes (C, D, G) through distortion separately and sum them. Nice. Do the same putting distortion after the sum? Way different. Play any music through perfect 3rd order distortion using a plugin like MSaturator and do a null test. Do you hear the perfect harmonic or just a whole lotta fuzz? It’s just physics. It’s just math. Even simpler instruments get fuzzy real quickly… that’s not a bad thing, we love that and it’s part of saturation! But, it’s not harmonics you’re hearing.
When it comes down to it, I’m not trying to be too pedantic here, I just get a bit annoyed when companies or people describe harmonic distortion as a special sweetness or timbre. I’m trying to share the insight I’ve gained over a few years of doing DSP. If you’re an engineer or musician, remember that when somebody uses harmonics to describe how a saturator or distortion works, it’s generally not harmonics that you’re hearing, that’s just marketing. The sound you love is governed by all sorts of phenomena, sound is a detailed and wonderful thing, and you should always let your ear be your guide!