Signal and Sensation

The FM Bass

Two sines, one modulating the other, and the spectrum is a Bessel function. Measured against the arithmetic at every ratio and index the page offers, the worst sideband is 0.18 dB out. At an index of 2.405 the first zero of J0 takes the note out of its own sound, 80 dB down while the sound stays loud, and a decaying index passes through that null 62 ms into every note, predicted at 61. At a ratio of 1 or 2 the folded sidebands land back on the note and the null only half happens.

Open fullscreen →

What it is

An FM bass, playable, and the arithmetic that says exactly what it will sound like.

Two sine waves. One is the note. The other modulates its frequency, at some whole multiple of it, by some amount. The multiple is the ratio and the amount is the index, and between them they decide the whole spectrum. That’s the DX7 bass, the grime square, the bite on the front of a garage sub. Here it’s on A1 with the ratio switchable between 1, 2 and 3, the index between 1, 2.405 and 4, and a switch to hold the index steady instead of letting it decay.

The blue line across the spectrogram is the note itself, 55 Hz. Watch it rather than the sidebands, because the finding is that it goes out.

How it works

The maths is a hundred years old and exact. A carrier modulated by a sine at index beta has sidebands at the carrier plus and minus every multiple of the modulator, and the amplitude of the k-th one is the Bessel function J_k(beta). The page renders the sound by accumulating phase, measures each sideband with a Goertzel filter, and compares with Bessel computed from its integral.

They agree. Across all nine combinations of ratio and index the page offers, the worst sideband is 0.19 dB from its predicted level, and most are within 0.06. The real Web Audio graph, two oscillators with the modulator’s gain set to index times its own frequency, rendered offline, gives the same numbers to the decimal.

Getting that agreement took one correction. My first prediction was the bare Bessel table and it was 25 dB out at a ratio of 1. The lower sidebands run down past zero hertz and fold back onto the upper ones, so at low ratios two components share a frequency and add as phasors, not as magnitudes. Summing them with their phases, including the constant the phase accumulator carries because it starts at zero, brought every ratio into line. A ratio of 3 never folds, and that one matched from the start.

Then the interesting part. J_0 is the carrier’s own amplitude, and J_0 has its first zero at beta = 2.4048. At that index the note is not in its own sound. Measured at a ratio of 3, the fundamental sits 73 dB below the loudest sideband while the sound is as loud as ever.

A real bass note has a decaying index, and that means every note sweeps down through 2.4048 on its way out. With an index starting at 4 and a 120 ms decay, the note should cross the null at 61 ms. Measured, the fundamental dips 41 dB at 62 ms.

What surprised me

The null only happens if the ratio is high enough. At a ratio of 3 the fundamental drops 41 dB on every note. At a ratio of 2 it drops 21, and at a ratio of 1 it drops 9 and that’s all it ever does. The reason is the folding: only two components can ever land on the note itself, the carrier and the one lower sideband that folds through zero onto it, which needs 1 + k times the ratio to equal -1. At a ratio of 1 that’s the second sideband and at 2 it’s the first. At 3 and above there’s no such sideband, so the note is the carrier alone and J_0’s zero empties it completely. At a ratio of 1 the folded sideband leaves a floor of 0.139 on the fundamental, which has no zero to pass through, so the note can never disappear.

That’s the difference between an FM bass with a bite and one without, and it’s a property of the ratio rather than of the index or the envelope. Nobody I’ve read puts it that way round.

Two instruments went wrong. The first was the prediction above. The second was a search for the index at which the note is quietest, which I wrote as a scan over the folded prediction at a thousand indices, each summing sixty Bessel functions each computed from a two thousand step integral. It gave the right answer in twenty four seconds, and a test that takes twenty four seconds is a test that gets deleted. Only two components can ever land on the fundamental, so the whole thing collapses to a closed form: a coarse scan and a refinement now take 51 ms.

What I would do next

Feedback. A DX7 operator can modulate itself, which isn’t a Bessel spectrum at all, it’s a fixed point that goes to a sawtooth as the feedback rises and then breaks into noise. The index where it breaks is a number, and I want it.

Then the ratio as a knob rather than three buttons. Non integer ratios put the sidebands between the harmonics, so the sound stops having a pitch and starts being a bell, and the threshold where the ear gives up on the fundamental would be a listening test with a number attached.