Build your own tools

Signals and systems

Linearity, memory and why EQ and distortion behave so differently

By Maru editorial team9 min read

Two plain sine tones, 300 Hz and 500 Hz, are about to go through a drive pedal. Before you press play, predict what comes out. The two tones a little rougher, each with its own harmonics on top? Or something else?

Raise Amount slowly. A new tone appears below both notes you played. Where is it, and where does it come from?

Two notes meet in a drive

Amount
-1-1-0.5-0.5000.50.511INPUTOUTPUT

Listen under the two tones as you raise Amount. A low hum fades in at 100 Hz, lower than either note you played. Then look at the spectrum: there are new peaks at 700, 1100 and 1300 Hz too. None of them is a harmonic of 300 Hz or of 500 Hz alone. They exist only because the two notes went through the drive together.

Switch the source to the guitar chords and you'll hear the musical version of the same thing: a full chord through heavy drive turns thick and growly, with a low rumble that wasn't in the clean chord. Why can you stack EQs in any order, but swapping your distortion and your EQ changes everything?

Two questions you can ask any box

Think of every effect as a box: a signal goes in, a signal comes out. Engineers call that box a system, and there are two questions that sort systems into two very different families.

  1. Scaling. If you play twice as loud into it, do you get exactly twice as much out?
  2. Adding. If you put two sounds through it together, do you get the same result as putting each through on its own and mixing them afterwards?

A box that passes both is linear. A volume fader passes: half the input, half the output, and two sounds mixed then faded equal the same two sounds faded then mixed. An EQ passes too, as long as nothing after it clips.

Drive fails both, on purpose. Here's the smallest version. Imagine a box that refuses to output anything above 1. Feed it 0.7 and 0.7 separately, add the answers, and you get 1.4. Add them first and feed it 1.4, and you get 1. Same inputs, same box, different answer. That gap is exactly what you heard above: the drive reacts to the sum of the two notes, the combined wave, not to each note politely in turn.

What an EQ can and can't do

An EQ is a beautifully limited machine. It can make each frequency already in your sound louder or quieter, and nudge its timing a little (that's phase). That's all. Feed an EQ a single 300 Hz sine and, whatever you do to the knobs, the only thing that comes out is a 300 Hz sine at some level. It cannot invent a 100 Hz hum or a 700 Hz edge, because a linear box never creates a frequency that wasn't going in.

That is why EQ feels safe and predictable, and why two EQs in a row can trade places: each one only rescales what's there, and rescaling in either order lands in the same place. It's also why an EQ boost at 60 Hz does nothing for a kick drum that has no energy at 60 Hz. You can only turn up what exists.

One thing that surprises people: an EQ has memory. A filter's output depends on the last few samples as well as the current one; that's how it tells low from high frequencies at all. Memory doesn't make a box nonlinear. An echo is the clearest example: it remembers everything you played for a second or two, yet two notes through an echo come out as exactly two echoed notes. Memory and linearity are separate properties, and a box can have either, both or neither.

What a drive stage adds

A drive is a curve. Small samples pass almost unchanged; big ones get squashed toward a ceiling. Bending a wave like that reshapes it, and a reshaped repeating wave contains new frequencies. With a single note, they're harmonics of that note, which is the warm thickening people reach for drive to get.

With two notes, the curve sees one combined wave whose peaks depend on how the two notes line up, moment by moment. So it also creates intermodulation: new tones at sums and differences of the notes' frequencies. That's the part the "harmonics on each note" picture misses.

Together is not the same as separately

Computed from the starter effect's soft-clip curve at Drive 0.2, with 300 and 500 Hz at equal level. Shaped one at a time, each tone only gains its own harmonics (900 and 1500 Hz). Shaped together, they also grow 100, 700, 1100 and 1300 Hz.

Look at where the new tones fall: 100, 300, 500, 700, 900, 1100, 1300. They're all odd multiples of 100 Hz. That's no accident. 300 and 500 Hz are the 3rd and 5th harmonics of 100 Hz, so everything the drive invents lands on the same harmonic ladder, and your ear hears it as one fuller sound with a low root at 100 Hz.

This is why power chords were made for distortion. A root and a fifth sit in a simple 3:2 ratio, so the new tones line up on one harmonic series, and the strongest new low one lands an octave below the root. The chord gets heavier and still sounds like one big note. Add a major third and the ratios get more complicated (and in equal temperament the third is slightly off a pure 5:4), so the new tones land between the ladder's rungs and the chord turns to mud. Guitarists learned that by ear decades before anyone drew a spectrum: heavy rock is built on fifths and octaves for a reason.

Same idea, different place: the spacing of a chord decides what a drive will grow from it. Chords and voicing shows how to change the notes before you reach for an EQ to clean up the result.

Why the order of EQ and drive matters

Now the opening question answers itself. Two linear boxes only rescale frequencies, so they commute: either order, same result (with fixed settings and nothing clipping in between). Drive doesn't commute with anything, because what it creates depends on what it's fed.

EQ before drive changes what the drive sees. Boost the lows going in and the bass hits the curve harder, so it dominates the distortion and grows its own intermodulation with everything else. That's why metal guitarists often cut low end before a high-gain amp: the palm-muted chug stays tight instead of flubby.

EQ after drive shapes what the drive made. A low-pass after the drive removes the fizz the curve created; a low-pass before it only dulls the input, and the drive cheerfully grows new highs from what's left. A guitar speaker cabinet is exactly this kind of after-the-drive filter: it rolls off the top end, which is a big part of why an amp's distortion sounds smooth through a cab and harsh straight into a mixer.

Try it in the lab: switch to the bass phrase, push Amount, and imagine where you'd put a low cut. Before, the drive gets cleaner and tighter. After, it gets thinner but keeps its grind.

Memory hides in unexpected places

The textbook drive curve is memoryless: each output sample depends only on the input sample at that instant. Real drives wrap that curve in filters. Maru's Drive runs its curve at four times the sample rate to keep the new high harmonics from folding back as harsh aliasing, and the filters that make that work give the whole effect a little memory and a tiny delay.

You won't hear that delay on its own. It matters the moment you compare two renders sample by sample, which is the subject of the box below.

For developers: a null test you can write

The adding question is a test. Feed two signals through your processor separately, add the results, and compare with the sum fed through once. For a linear box the difference is silence (within rounding); for drive it isn't. Here is the same check on the starter effect's curve, one sample at a time:

ts
import { driveTransfer } from "@maruaudio/module-sdk-processor-effect/dsp"

const drive = 0.2
const together = driveTransfer(0.4 + 0.4, drive)                   // about 0.97
const separately = driveTransfer(0.4, drive) + driveTransfer(0.4, drive) // about 1.71

On whole renders, start both runs from the same fresh state, with the same length of silence first, and line them up to the sample. A filter that starts halfway through its settling, or a one-sample offset, will make a perfectly linear box fail the test.

Where the rule breaks

"EQ is linear" is a rule about an ideal EQ. Push a big boost into a stage that clips (a saturating channel strip, an overloaded output) and the chain stops being linear at that point. A filter whose cutoff is moving, like a wah or an auto-filter, is still linear at each instant but changes over time, so the order games get more complicated.

And the reverse: a failed null test doesn't prove a box is nonlinear. A misaligned render, a reset that didn't happen, or a different starting state all produce differences too. Check the experiment before blaming the box.

Our take: start with the simplest sound that asks the question. Two sine tones show you intermodulation in seconds. Then go back to the music: the guitar chords tell you whether that new low rumble makes the part heavier or just muddier, and only your ears can decide that.

Make it yours

Take a two-note part of your own: a bass line with a fifth in it, or a guitar double-stop. Before you play it through a drive, work out the difference between the two notes' frequencies; that's roughly where the new low tone will appear. Then play it and listen for it.

Now try a wider and a narrower voicing of the same notes, and find the Amount where the chord still sounds like a chord. Open Drive and save that setting with a name that reminds you why: "Fifths, thick" or "Thirds, gentle". Next time a chord turns to mud under distortion, you'll know whether to change the drive or the voicing.

Quick check

  1. An echo remembers the last two seconds of what you played. Does that make it nonlinear? No. Memory and linearity are separate. Two notes into a plain echo come out as two echoed notes and nothing new. It's tempting to think "complicated" means "nonlinear", but an echo is just delayed copies added together, which passes both questions.
  2. You play E2 and B2 (a power chord) through heavy drive and hear a strong note an octave below the E. Is your bass amp leaking into the mix? Probably not. A fifth is close to a 3:2 ratio, and the drive's new low tone lands an octave below the root. That extra weight is why power chords and distortion go together.
  3. You put a low-pass filter before a drive to tame fizz, and the fizz is still there. Why? The drive creates new high harmonics from whatever reaches it. Filtering before it dulls the input but not what the curve makes. Move the filter after the drive, the way a speaker cabinet sits after an amp.

Next steps

  • Explore the chapter: Building instruments and tools. Follow the path from a musical idea to a tested effect, instrument or MIDI tool.
  • Build it: Anatomy of a Maru module. If EQ and drive are such different machines, where does a module say which one it is, and where does the maths live?
  • Go deeper: Distortion and saturation. Curves, harmonics and why oversampling keeps high notes from turning harsh.

Also in this chapter

Build your own tools

Translate a musical intention into a focused tool whose sound and behavior you can test.

Cover of Learn Audio

Get the book

Keep the guides beside your next project. Read the free book at your own pace, with links to try the experiments online.

Download the free book

Learn Guides

Make something useful with your sound

A recording you want to play, a preset you want to change or a loop you want to finish. Follow free guides and interactive lessons toward a useful musical result, starting with the problem you want to solve.

Put it into practice

Make a recognisable sound with a recipe, or carry one idea from start to finish in a project.

Explore recipes and projects