Signal and Sensation

Warm and Harsh

Distortion is a curve, and everything people say about warm and harsh is a claim about its shape. Measured at the same distortion, a soft clip's harmonics fall 39 dB an octave and a hard clip's fall 12. Even harmonics need an asymmetric curve, and on two tones they cost a note two octaves down that nobody played, at -29 dB.

Open fullscreen →

What it is

Three distortion curves, a tone, and then two tones.

Soft is a tanh, which rounds the peaks off. Hard is a clip, which chops them flat. Asymmetric bends the top half of the wave harder than the bottom, the way a single valve stage does. The inset in the corner is the curve itself, what goes in along the bottom and what comes out up the side, and the bars below are what each one adds to a 220 Hz sine, measured. All three are driven to the same amount of distortion, so the shapes are compared at equal THD rather than equal knob.

Then two tones, 440 and 571 Hz, through the same curves. The bars now include things that are not harmonics of either tone, and the one in ember is the difference tone: a note below both, that nobody played. Only one of the three curves makes it.

How it works

Every number is measured off the rendered signal, and the drives are found by bisection so that every curve gives exactly 5% or exactly 20% THD on the tone. The harmonics are read with a Goertzel filter over forty cycles. Rolloff is a straight line fitted to their levels in dB against octaves. Even over odd is the power in the even harmonics against the odd ones, above the fundamental.

For two tones the products are read at the frequencies the arithmetic puts them: the difference f2 - f1 at 131 Hz, the third order pair at 2f1 - f2 and 2f2 - f1, the sum at f1 + f2, and the seventh order product 4f1 - 3f2 at 47 Hz, all against the average of the two tones.

The sound is a WaveShaper with the same curve sampled into it and no oversampling, so it’s the same function as the maths, and rendered offline it agrees to the decimal in every row: 20.0% THD and a rolloff of -28.6, -13.4 and -21.1 dB an octave for soft, hard and asymmetric, and on two tones a difference tone of -28.6 dB from the asymmetric curve and none from the other two.

What surprised me

Warm and harsh is a slope, and the slope doesn’t care how hard you drive. At 5% distortion the soft curve’s harmonics fall away at 39 dB an octave and the hard clip’s at 12, so the clip’s fifth harmonic is within 4 dB of its third where the soft curve’s is 24 down. At 20% the soft curve is at 29 and the hard clip is at 13. A clip’s corner has energy all the way up whatever you do to it, which is why a hard clip sounds harsh at any setting and a soft one only gets there when it’s driven very hard.

Even harmonics need asymmetry and nothing else. Both symmetric curves measure their evens more than 120 dB down, which is the arithmetic’s floor. The asymmetric one measures +4.4 dB even over odd, its second harmonic at -27 and its third at -32. If a distortion is adding even harmonics it isn’t symmetric, and the reverse.

The price of the evens is the finding. On two tones the asymmetric curve puts a difference tone at 131 Hz, two octaves and a bit below the pair, at -28.6 dB relative to the tones, and a sum tone at 1011 Hz at the same level. The symmetric curves put nothing there, -118 dB and below. That difference tone is a note nobody played, and on a chord it’s the mud everyone hears when they saturate one. Even harmonics on a single note and difference tones on a chord are the same property of the same curve, and you don’t get one without the other.

The measurement fought me, and the way it fought is worth the paragraph. My first test pair was 440 and 550 Hz, a major third, and the hard clip read -44 dB at the difference frequency. A hard clip is an odd function and can’t produce an even order product, so I decided the -44 was aliasing, the clip’s slow rolloff folding back off the sample rate. I rendered it at two, four, eight and sixteen times the rate to prove it. It read -44.5 dB every time. Aliasing moves with the sample rate by definition, so it wasn’t that.

It was arithmetic. 440 and 550 are a 4:5 ratio, and the seventh order product 4f1 - 3f2 is 1760 - 1650, which is 110 Hz, the same frequency as the difference tone f2 - f1. The hard clip’s slow rolloff gives it plenty of seventh order to put there. Moving to 440 and 571, where no low order product lands on any other, the hard clip’s difference tone is empty at -118 dB and its seventh order product shows at its own frequency, 47 Hz, at -45. Simple ratio test tones can’t tell even order from high odd order, and a just major third is a simple ratio. Two things follow. The trap is real for anyone measuring intermodulation with musical intervals. And the mud under a hard clipped chord is real too, it’s just seventh order rather than second, and 34 dB louder than the soft curve’s.

What I would do next

Part thirteen is the chord stab, which is where this leads: a chord is a set of ratios, and which of them are simple decides where its own harmonics beat, before any distortion.

The oversampling that turned out not to matter here does matter for the hard clip’s aliasing at high frequencies, and that’s the measurement I didn’t make. The WaveShaper has two and four times oversampling built in, and the level of the folded products against the real ones, at each setting, is a number the page could read.

The other one is the asymmetric curve’s shape. I used a three to one ratio between the halves because it was easy to reason about. Real valve stages are gentler and their even to odd ratio is nearer 0 dB than +4, and the difference tone they put under a chord is correspondingly quieter. Sweeping the asymmetry and reading the difference tone would say how much mud a given amount of warmth costs, which is the trade producers are actually making.