How compression works
You sample a drum break, load it into the sampler, and something has gone missing. The kick and the snare are still there, but the quiet ghost notes between them, the ones that gave the loop its swing, have sunk out of hearing. Or the problem runs the other way: one note in a bass part leaps so far above the rest that there is no sensible level to set for the whole thing.
A compressor is the tool for both, and what it does is turn down whatever is too loud. Everything quieter it leaves alone. Every control on this page is wired to a working compressor and a drum loop, and the panels play audio.
A hand on the fader
Before compressors, an engineer did this by hand. The singer leans into a loud phrase and the engineer pulls the fader down; the phrase passes and the fader goes back up. Done well, the quiet lines stay audible and the loud ones stop overloading the tape. The technique has a name, gain riding, and people still do it.
A compressor is that job automated. You tell it how loud is too loud, and how firmly to pull down when a sound crosses that point. There is one thing it cannot do, which catches people out: it has no way to make a quiet passage louder. All it can do is hold the loud parts back. You then turn the whole thing up, and the quiet parts come up with it.
Threshold and ratio
Those two instructions are the two main controls, and on a lot of compressors they are the only ones you need to touch.
Threshold is how loud is too loud. Set it at -20 dB and anything quieter than that passes through untouched, while anything louder gets pulled down. Lower the threshold and more of the sound comes under the compressor's attention.
Ratio is how firmly it pulls. At 2:1, a hit that would have been 10 dB over the threshold comes out 5 dB over, so it moved half as far as it would have. At 10:1 that same hit comes out 1 dB over. At 20:1 and beyond almost nothing gets past, which is what a limiter is.
In practice you set the threshold by ear, lowering it until the compressor is working on the parts you want it working on, and leave the ratio between 2:1 and 6:1 for most material. If you would rather see the shape those two controls make, panel 1 draws it: the level going in along the bottom, the level coming out up the side.
The third slider there is the knee, a refinement on the same idea. With the knee at zero, a sound is untouched at one level and compressed a decibel higher, and you can sometimes hear it switching in and out as a part gets louder. A knee of 6 to 12 dB brings the compression in gradually instead, which is why most compressors sit somewhere in that range by default.
It takes time to react
None of this happens the instant a sound arrives. Attack is how long the compressor takes to pull the level down once something crosses the threshold, and release is how long it takes to let go afterwards. On drums these two do more to the sound than the ratio does.
A slow attack lets the first few milliseconds through before the gain drops. On a drum those milliseconds are the stick hitting the skin, and keeping them is what makes a compressed drum still sound like it was hit. A fast attack catches the transient as well, which flattens the hit. Panel 2 starts at a 10 ms attack: drag it down to half a millisecond and the loop loses its edge, with no change in ratio at all.
Release has the opposite problem. Too short and the gain rushes back between hits, which pushes up the room and the hiss in the gaps. Too long and the gain never recovers before the next hit, so a loud note drags the level of everything that follows it down. On a loop that becomes pumping: audible breathing in time with the music.
Panel 2 carries threshold and ratio as well as the timing, so you can hold one pair still and move the other. The quickest way to hear what each does is to pull the threshold down until the gain reduction is 8 dB or so, leave it there, and sweep the attack from one end to the other.
Where the loudness comes from
Compression on its own makes a signal quieter. The loudness arrives in the step afterwards: makeup gain, which lifts everything back up until the peaks are where they started. Because the loud parts were pulled down first, raising the whole signal brings the quiet parts up further than it brings the peaks up. The gap between them closes.
On the loop in panel 3, the loudest snare starts out 17 dB above the ghost note before it. Compress it, put the peak back with makeup gain, and that distance drops to around 11 dB. The ghost note has not been amplified on its own. It has been left alone while everything louder was pulled towards it, and then the whole loop was raised.
You will see this described as reducing crest factor, meaning the difference between a file's peak and its average level. On a sparse drum loop that measure is misleading, since most of the file is the gaps between hits and the average ends up describing the silence, which is why panel 3 compares two specific hits instead.
The warning sign is the same either way. Close that distance too far and the loop will measure loud and sound flat, because what made it feel loud was the distance between the hits and everything else.
Making space for something else
Everything so far has had the compressor listening to the same sound it is turning down. There is no reason it has to. Feed the detector from a different track and the compressor still works on the bass, but it reacts to the kick: every time the kick lands, the bass is pushed down and then allowed back up.
That second input is the sidechain, and this use of it is called ducking. A kick and a bass both live at the bottom of the spectrum and compete for the same room, and the usual fix is to turn one of them down, which costs you the part. Ducking turns the bass down only for the fraction of a second the kick needs, so both parts stay at full level the rest of the time.
Release is the control that decides how this sounds. It sets how quickly the bass comes back, and setting it by ear against the tempo is most of the work: back up just before the next kick and the track breathes with the beat, still down when the next kick lands and the bass never fully returns. That breathing is the pumping from earlier, which was a fault to avoid when a compressor was working on its own signal and is the entire point here.
One thing to be clear about: this belongs at mix time, not in your sample library. A ducked bass sample is a bass sample with holes cut in it, and those holes fit one kick pattern at one tempo. Keep the bass whole and duck it in the track.
Bit depth and quiet detail
Take that same break, get it sounding right in your DAW, then sample it into something older and listen to the ghost notes disappear all over again. This one is about the converter rather than your ears.
A converter has a fixed number of levels it can place a sample on, spaced evenly from silence up to full scale. 16-bit has around 65,000 of them. 12-bit has 4,096, and 8-bit has 256.
The spacing is the same at the top and the bottom, so a loud sound has thousands of levels to describe its shape and a ghost note 30 dB down might have four. A compressor lifts that quiet material further above the step size before the conversion happens, and more of it survives. On the SP-1200 this is a large part of how those records were made, and it applies to the GrandPA and any other device sampling at reduced depth.
Settings worth starting from
Start with the ratio at 4:1 and the knee around 6 dB, then lower the threshold until the gain reduction reaches 3 to 6 dB on the loudest hits. On most material that much does useful work while still sounding like nothing has happened to it.
- Drums and percussion. Attack 10 to 30 ms so the transient gets through, release 80 to 200 ms so the gain recovers between hits.
- Sustained notes and pads. Attack can be fast, since there's no transient to protect. Release long, 300 ms or more, so the gain moves slowly enough to be inaudible.
- One-shots you'll map across a keyboard. Go lighter than you think. The sampler's own envelope and velocity mapping will shape the sound again, and compression baked into every zone stacks up in a way you can't undo later.
- Before a 12-bit or 8-bit converter. Compress for dynamic range rather than for loudness. A ratio of 4:1 to 6:1 with the threshold low enough to catch the body of the sound, then normalise.
Keep the unprocessed file. Compression is one of the few things in a sample library that cannot be undone once it's written in, and the settings that suit one instrument rarely suit the next.
Where SampleStack fits
SampleStack has no compressor, so the processing here belongs in your DAW or on the way into the sampler. What it does give you is the measurement: every sample's peak level in dBFS in the inspector, so you can see which files are near full scale and which are sitting 20 dB down before they reach a converter that can't spare the range. Fades and seamless loops are in the editor.
Questions
- What does a compressor do?
- It turns down anything louder than a level you set, and leaves everything below that level alone. The threshold is the level, and the ratio is how firmly it pushes down: at 4:1, a sound arriving 4 dB above the threshold comes out 1 dB above it. The other controls all adjust how that one behaviour is applied.
- Why does my sample sound quieter after compressing it?
- Because compression only ever turns things down. The loudness people associate with compression comes from the makeup gain applied afterwards, which lifts the whole signal back up. The peaks end up where they started and everything quieter ends up closer to them, so the average level is higher even though the peak is not.
- What should I set the attack to?
- It depends on whether you want to hear the start of the sound. A slow attack of 20 ms or more lets the stick, pick or transient through before the gain drops, which keeps a drum sounding like a drum. A fast attack of a millisecond or two catches the transient too and flattens it. Neither is wrong, but a fast attack on percussion is the usual cause of a loop that sounds dull after compression.
- Should I compress before loading samples into hardware?
- Often yes, particularly on samplers with 12-bit or 8-bit conversion or a small memory budget. Quiet detail sits closer to the converter's step size, so lifting it first means more of it survives. Compress with that in mind rather than for loudness, and keep an unprocessed copy, because baked-in compression cannot be taken back out.
Written ยท Updated