User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Category Audio Tools
Drop audio file here or click to browse WAV, MP3, OGG, FLAC, AAC, M4A, WEBM
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Dynamic range compression reduces the volume difference between the loudest and quietest parts of an audio signal. A compressor attenuates signal that exceeds a threshold by a defined ratio. Incorrect settings destroy transients, introduce pumping artifacts, or leave audio untouched. This tool applies real DSP compression via the Web Audio API's DynamicsCompressorNode, processing the entire file offline at full sample rate. The result is a downloadable WAV file. It assumes input is unmastered or requires dynamic control. It does not replace multi-band compression or limiting for broadcast-standard loudness (EBU R128 / ITU-R BS.1770).

Compression parameters interact nonlinearly. A fast attack below 5 ms clamps transients, reducing punch in percussive material. A high ratio above 10:1 approaches limiting behavior. The knee parameter controls the sharpness of the gain reduction curve around the threshold: a soft knee (20 - 30 dB) provides gentler onset. After compression, makeup gain restores perceived loudness. Monitor the before/after waveforms to verify you are not over-compressing.

audio compression dynamic range compressor audio effect web audio audio processing dsp

Formulas

The compressor applies gain reduction GR to any signal exceeding the threshold. Below threshold, the signal passes unchanged. Above threshold, the output level is governed by:

y = T + x โˆ’ TR

where x = input level in dB, y = output level in dB, T = threshold in dB, R = ratio. The gain reduction at any instant is:

GR = x โˆ’ y = (x โˆ’ T) โ‹… R โˆ’ 1R

A soft knee (K in dB) creates a gradual transition zone from T โˆ’ K2 to T + K2 where the ratio ramps from 1:1 to the set R. Attack (ta) and Release (tr) define the time constants of the envelope follower that smooths the gain reduction signal, preventing instantaneous jumps. Makeup gain GM is applied post-compression as a linear gain multiplier:

GM = 10dBmakeup20

where T = threshold (dBFS), R = compression ratio, K = knee width (dB), ta = attack time (s), tr = release time (s), GM = makeup gain multiplier.

Reference Data

PresetThreshold (dB)RatioAttack (s)Release (s)Knee (dB)Makeup (dB)Use Case
Gentle Vocalโˆ’182.5:10.0100.15012+3Podcast, narration
Vocal Presenceโˆ’244:10.0050.1006+6Lead vocals in a mix
Drum Bus Glueโˆ’143:10.0200.20010+4Cohesive drum group
Drum Slamโˆ’208:10.0010.0500+8Parallel / NY-style compression
Acoustic Guitarโˆ’163:10.0150.1208+3Evening out strumming dynamics
Bass Levelerโˆ’124:10.0100.1806+5Consistent bass level
Mix Busโˆ’102:10.0300.30020+2Gentle stereo bus glue
Broadcast Limiterโˆ’620:10.0010.0500+6Broadcast / streaming ceiling
Transparent Masterโˆ’81.5:10.0250.25030+1Mastering with minimal coloring
Speech De-Esser (approx)โˆ’306:10.0010.0302+0Taming sibilance (broadband approx)
Room Mic Crushโˆ’3012:10.0020.0800+10Heavily compressed ambient mic
Finger-Picked Guitarโˆ’202:10.0120.10015+2Preserving dynamics while controlling peaks
Piano Dynamicsโˆ’222.5:10.0200.20018+3Taming fortissimo without killing expression
Podcast Loudโˆ’165:10.0030.0804+7Maximized perceived loudness for spoken word
No Compression01:10.0100.1000+0Bypass / reference comparison

Frequently Asked Questions

A hard knee (0 dB) applies the full ratio immediately when the signal crosses the threshold. A soft knee creates a transition zone centered on the threshold. Within this zone, the effective ratio gradually increases from 1:1 to the target ratio. A knee of 30 dB means the transition spans from T โˆ’ 15 dB to T + 15 dB. Soft knees sound more transparent on complex material like full mixes, while hard knees provide more aggressive, audible compression suitable for parallel processing or deliberate effect.
An attack time below approximately 1 ms clamps the initial transient of drums, snares, and plucked instruments. The transient carries the "snap" or "click" that the ear uses to perceive punch. Clamping it flattens the perceived impact. For drums, attack times of 15-30 ms allow the transient through before the compressor engages, preserving punch while controlling the sustained body. Extremely fast attack is useful for limiting (ratio > 10:1) where the goal is absolute peak control.
Compression reduces signal peaks. Without makeup gain, the overall level drops. The compressor lowers loud parts but does not raise quiet parts. You must add makeup gain to restore perceived loudness. A common starting point: if you see approximately 6 dB of gain reduction on peaks, add 3-6 dB of makeup gain. Over-compensating with makeup gain will increase the noise floor and may cause clipping.
No. This tool applies single-band (broadband) dynamic range compression across the entire frequency spectrum. Multi-band compression splits the signal into frequency bands (e.g., low, mid, high) and compresses each independently. That requires crossover filter design (Linkwitz-Riley or Butterworth) and per-band compressor instances. For most tasks - vocal leveling, bus glue, podcast processing - single-band compression is standard and sufficient.
You can upload any format your browser can decode: WAV, MP3, AAC, OGG, FLAC, WEBM, and M4A are commonly supported. The browser's built-in decoder handles the conversion to PCM internally. The output is always an uncompressed WAV file (PCM 16-bit or 32-bit float depending on buffer). WAV preserves full quality and avoids re-encoding artifacts. If you need MP3 output, use a separate converter after processing.
A ratio of 1:1 means no compression. At 2:1, a signal exceeding the threshold by 10 dB is reduced to 5 dB above threshold. At 10:1, that same 10 dB overshoot becomes 1 dB. At 20:1 or higher (infinity:1), the compressor acts as a limiter, preventing the signal from exceeding the threshold by more than a fraction of a dB. True brickwall limiting typically uses ratios above 20:1 combined with attack times under 1 ms.