SynthMaker Circuits Manual Open SynthMaker (opens in a new tab)
Chapter 2 · Diodes and clipping

Hard and soft clipping

Hard clipping cuts a wave off at a flat ceiling with a sharp corner, like an op-amp hitting its ±4 V rails; soft clipping bends it through a gradual knee, like diodes in its feedback. The sharper the corner, the stronger the high harmonics, so hard clipping sounds buzzier.

Clipper · the parts list
circuit Clipper  setting input: 0.02 V, from 0.005 V to 2 V  setting output: 0.34 V, from 0.1 V to 5 V  U1 in m out opamp rails 4V  Rg m gnd 4.7k  Rf out m 151k  D1 out m 1N4148  D2 m out 1N4148end
Scope · out

Press Play to see the wave after the circuit, at out.

A short riff through the circuit, round and round. Turn the knobs while it plays. Open in SynthMaker ↗ (opens in a new tab)

What you're hearing

Hard clipping is a ceiling. Treat the op-amp as a box for now; chapter 3 explains it (the op-amp's two rules). It multiplies the input by 1 + Rf/Rg = 1 + 151 kΩ / 4.7 kΩ = 33.1, about 30 dB, but its output can't go past its rails: here ±4 V, about what an op-amp in a 9 V pedal can swing. Take the diodes out and the stage is clean right up to 4 V ÷ 33.1 = 0.121 V in. Above that, the output stops at 4 V, however much more goes in. The bend takes about 12 mV: the peaks are 1% short of the clean gain at 0.122 V in, and 10% short at 0.134 V. At the hard button's 0.24 V in, the output sits flat against the rail for two thirds of each half of the wave.

Soft clipping is a knee. With the diodes in, the output is the input plus the voltage across the diodes. The current in Rg comes back through Rf and the diodes side by side. While the diodes pass almost nothing, Rf carries it all and the gain is 33.1. As the voltage across them rises past about 0.2 V, the diodes take a growing share, and the gain slides smoothly towards 1. At the soft button's 0.02 V in, Rg carries 4.3 µA. The diodes hold 0.31 V and carry about half of it, 2.2 µA, so the peak comes out at 0.33 V instead of 0.66 V: half squashed. The diodes start bending at about 0.2 V, while the rails are 4 V away. So the hard version needs 12 times the input to be half squashed.

How fast each one goes from light to heavy. Here's where each starts to bend (its peaks 10% under the clean level), where it's half squashed, and the drive between the two. The middle row is the diode clipper, with its diodes to ground:

how it clipsstarts to bend (10%)half squashed (50%)light to heavy
the rails (hard)0.134 V in0.241 V in5.1 dB
diodes to ground0.45 V in1.04 V in7.2 dB
diodes in the loop (soft)6.3 mV in19.7 mV in9.9 dB

A flat ceiling is as fast as clipping gets. At the 10% point the output is 0.9 of the clean level; half squashed, it's 0.5. If the output never falls as the input rises, the input has to grow at least 1.8 times between the two (0.5 × 1.8 = 0.9): 20 log 1.8 = 5.1 dB. The rails hit that limit exactly. Diodes in the loop need 9.9 dB, almost twice as many.

The sharper the corner, the stronger the high harmonics. Both versions clip both halves of the wave alike, so both add only odd harmonics: 3, 5, 7 times the note's frequency, and so on. What differs is how far up they reach. A corner, a sudden change of slope, makes harmonics that fall off only about 12 dB per octave. A smooth knee's harmonics fall away faster and faster. At the two buttons' settings, the 3rd and 5th harmonics come out at similar levels, but from about the 9th up, the hard version's are far stronger. That's the fizz on the hard button. Drive a soft clipper hard enough and it gets squarer too: its knee stays round, but the wave crosses it faster. Even harmonics (2, 4, 6 times) only appear when the two halves clip differently. Measured here on a 100 Hz note: the soft version's 7th harmonic is 39 dB below the note and its 21st about 101 dB below; the hard version's 7th is 35 dB below and its 21st only 48 dB below.

Diodes to ground sit in between. In a diode clipper, the diodes go from the signal to ground after a resistor, and they cap the whole signal: 6 V in comes out at 0.63 V, and 40 V at only 0.72 V. In the loop, they cap only what the gain adds, and the input passes through underneath (see op-amp overdrive). That's often the difference between a distortion circuit and an overdrive: many distortions put the diodes to ground after a gain stage, and many overdrives put them in the feedback loop.

What you hear, and how it plays. The hard version is buzzier and brighter, and every note louder than 0.121 V in comes out at the same 4 V: playing harder changes the tone, never the level. The soft version is rounder, and because the input passes underneath, the gain never falls below 1. From 0.1 V to 1 V in, 20 dB more, its peaks rise from 0.50 V to 1.51 V, 9.6 dB more. Playing harder still comes out louder.

Try this

  • Press "Hard: the rails" and turn input from 0.005 V to 2 V. Below 0.121 V the wave is clean. Past it, the tops go flat at 4 V and stay there. Near 2 V it's flat for nearly the whole cycle, close to a square wave.
  • Press "Soft: diodes in the loop" and turn input up from 0.005 V. The tops round off, but there's no ceiling: by 2 V in, the peaks reach 2.55 V. Turn output up as you go to keep the level.
  • Switch between the two buttons on a held note. The peaks match, so listen for the top end: the hard version has a fizz the soft one doesn't.
  • Open it in SynthMaker to change the parts. In the hard version (a # before D1 and D2), change rails 4V to rails -3V 4.5V. The two halves now clip at different heights, which adds even harmonics, as an op-amp biased off-centre does. One of the circuit demos is built this way.

The parts list

Clipper · the parts list
circuit Clipper  setting input: 0.02 V, from 0.005 V to 2 V  setting output: 0.34 V, from 0.1 V to 5 V  U1 in m out opamp rails 4V  Rg m gnd 4.7k  Rf out m 151k  D1 out m 1N4148  D2 m out 1N4148end

This is the soft version. The hard version is the same list with a # at the start of D1's and D2's lines, input at 0.24 V and output at 4.15 V.

How we checked it

Checked against ngspice, a standard circuit simulator: both versions as this page plays them (2×, rails included), driven by a 1 kHz sine, are within 0.07% of ngspice across the audible band (the soft one within 0.001%), and within 0.17% at the top of the input range.

Build it step by step

Further reading

  • D. T. Yeh, J. S. Abel and J. O. Smith, "Simplified, physically-informed models of distortion and overdrive guitar effects pedals", DAFx 2007: a distortion circuit with diodes to ground and an overdrive with diodes in the feedback, analysed side by side. PDF
  • D. T. Yeh, "Digital Implementation of Musical Distortion Circuits by Analysis and Simulation", PhD thesis, Stanford University, 2009 (the DK method). PDF
  • Hard and soft clipping, and what each does to a wave: Wikipedia: Clipping (audio)).
  • Why a square wave is the odd harmonics: Wikipedia: Square wave (its Fourier series).
  • The op-amp's gain and its output limits: Wikipedia: Operational amplifier.