Bit Crush
The lo-fi knobs, measured. Eight bits puts the noise floor 48.9 dB down, a tenth off the textbook figure, and turns a note at -40 dB into 27% distortion. Four bits gives 25 dB and that quiet note comes out as nothing at all. Dither brings it back as a tone in hiss for 4.9 dB of noise, and holding samples at 6 kHz grows a 1 kHz tone two images at 5 and 7 kHz, -14 and -17 dB, where the sinc says they should be.
What it is
The lo-fi knobs, one at a time, with the numbers on them.
A bitcrusher does two things. It rounds every sample to one of a small set of levels, which is the bit depth, and it holds each sample for a while before taking the next, which is a lower sample rate without the filter that’s supposed to come with one. The good ones do a third thing, dither, which is a little noise added before the rounding. This page has all three, a 110 Hz bass note that decays every second and a half so you hear its tail go through the quiet levels, and a set of measurements made on tones through the same crusher.
The top trace is a loud 110 Hz tone through the crush, with the clean one behind it. The strip is the same tone at -40 dB, magnified a hundred times, which is where the interesting things happen. The spectrum at the bottom is the crushed loud tone from 40 Hz to 22 kHz, with the noise floor the arithmetic predicts drawn across it in ice.
How it works
The noise floor is the signal power over the error power, where the error is what the crush added, and the textbook says a sine gets 6.02 dB a bit plus 1.76, less whatever it’s short of full scale. The loud tone here is 0.875 of full scale, the biggest sine four bits can hold without clipping the top level, so the textbook figure at 8 bits is 48.8 dB and the page measures 48.9. At 16 bits it’s 96.9 against 97.1, at 4 bits 24.7 against 25.1. Every depth is within half a dB of the book.
The quiet tone is measured for distortion, everything at multiples of 110 Hz against the tone itself, and for how much of the error is harmonic at all. At 8 bits the -40 dB tone comes out 27.1% distorted and 94.6% of the error is at harmonics: it’s a buzz, not a hiss. With dither the distortion is 1.6% and 0.2% of the error is harmonic, the rest is noise, and the loud tone’s floor drops from 48.9 to 44.0 dB to pay for it.
The hold is a sinc. Holding each sample for eight leaves a 1 kHz tone with images at 6 kHz minus and plus 1 kHz, and their levels against the tone are the sinc at 5 and 7 kHz over the sinc at 1: -13.8 and -16.6 dB predicted, -13.8 and -16.6 measured.
The crusher on the audio thread is an AudioWorklet doing the same three steps in the same order, and rendered offline on the same tones it gives the same figures: 48.9 dB, 27.1%, 1.6% with dither, and images at -13.8 and -16.6 dB.
What surprised me
A quiet note doesn’t get noisy at low bit depths, it gets distorted, and then it disappears. At 8 bits a step is 0.0078 and a -40 dB sine is 0.01 tall, so it only ever crosses three levels and comes out a staircase with 27% harmonic distortion. At 6 bits the step is 0.031, the sine never reaches half of one, and the output is exactly zero. Not quiet, not buried, gone. The tail of every note through a 6 bit crush ends early, at the moment it drops under half a step.
Dither brings it back. Add triangular noise a step wide before the rounding and the 6 bit version of that -40 dB tone reads -40 dB again, 7.2% distorted, in hiss that’s louder than the tone. At 8 bits the buzz becomes a clean tone with 1.6% distortion and a floor 4.9 dB higher. That’s the whole trade, and it’s a real one: dither is 4.9 dB of noise you can hear on a loud signal, bought so quiet signals keep their shape. Every converter you own does it and almost no bitcrusher plugin does, which is why crushed tails buzz. The buzz is the sound people want.
Full scale isn’t full scale. A quantiser with 2^bits levels has a top level one step short of 1, so a sine at 0.999 clips it and the textbook figure stops applying: at 4 bits I measured 23.3 dB against a book value of 25.8 and spent a while looking for the bug. There isn’t one. The book assumes the sine fits, and the biggest sine four bits can hold is 0.875 tall. Sizing the test tone to that put every depth within half a dB of the book at once.
What I would do next
This is part fifteen of fifteen, and the series has done what it set out to do: every knob on a synth, from stacking sines into a saw to the mono button and the crush, with a number on it that came off the sound rather than off a diagram.
What I would do next with this one is a decaying note as the measured signal rather than a steady tone: the distortion as a function of time down the tail, which is a curve that starts near zero and climbs to 100% at the moment the note vanishes, and that curve is the sound of a bitcrusher on a drum.