ferraus compress

Compress dynamic range (feed-forward, soft knee)

Synopsis

ferraus compress <input> [options] [-o <output>]

What it does

Feed-forward log-domain compressor with a soft knee, lookahead, RMS or peak detection, and a sidechain high-pass so bass does not pump the gain. 'auto' makeup adds back half the reduction a 0 dBFS signal would get. --mix below 100% gives parallel (New York) compression. Optional stages run around the compressor in this order: --highpass, compression, --character tube saturation, --deess, --lowpass; the 'tighten' preset (high-pass 60 Hz, 4:1, 5 ms / 60 ms, de-ess) uses them.

This command is also an fx stage and a pipeline op: ferraus fx in.wav -o out.wav --fx "compress:key=value".

Examples

Vocal preset

ferraus compress vox.wav --preset vocal -o vox_comp.wav

Parallel compression

ferraus compress drums.wav --ratio 6:1 --attack 1ms --mix 40% -o drums_par.wav

Compress, cut the extremes, and tighten

ferraus compress take.wav --preset tighten --lowpass 16kHz -o tight.wav

Options

FlagTypeDefaultMeaning
--thresholdgain-18dBLevel above which gain is reduced (dBFS)
--ratioratio3:1Input dB over threshold per output dB (4:1, or 4)
--attacktime10msTime to clamp down on a level rise
--releasetime100msTime to recover after the level falls
--kneegain6dBSoft-knee width centred on the threshold (0dB = hard knee)
--makeuptextautoOutput gain in dB, or 'auto'
--lookaheadtime5msHow far ahead the detector looks (latency is compensated)
--detectorrms | peakrmsLevel detector: rms (10 ms, smooth) or peak (fast)
--sidechain-hpffrequency80HzHigh-pass on the detector so lows do not drive the gain (0Hz = off)
--mixpercent100%Dry/wet: below 100% blends in the uncompressed signal (parallel compression); 0% returns the input
--characterclean | tubecleanclean, or tube: adds a tube-style saturation stage after the gain
--highpassfrequency—Optional high-pass before compression, e.g. 60Hz (set by the tighten preset)
--deesson|offoffDe-ess after compression (6.5 kHz, -20 dB, 6 dB range; set by the tighten preset)
--lowpassfrequency—Optional low-pass at the end of the chain, e.g. 16kHz (the tighten preset's optional top cut)
--presettext—Load a named preset (built-in or user); explicit flags override its values

Presets

  • vocal: Smooth vocal leveling: -20 dB, 3:1, 5 ms / 80 ms, RMS (threshold=-20dB, ratio=3:1, attack=5ms, release=80ms, knee=6dB, detector=rms)
  • drums: Punchy drums: -16 dB, 4:1, 15 ms attack lets transients through, peak detector (threshold=-16dB, ratio=4:1, attack=15ms, release=60ms, knee=3dB, detector=peak)
  • bus: Mix-bus glue: -14 dB, 2:1, 30 ms / 200 ms (threshold=-14dB, ratio=2:1, attack=30ms, release=200ms, knee=6dB)
  • master: Gentle mastering: -10 dB, 1.5:1, 30 ms / 250 ms, wide knee (threshold=-10dB, ratio=1.5:1, attack=30ms, release=250ms, knee=8dB, lookahead=5ms)
  • tighten: Compress and tighten: high-pass 60 Hz, compress 4:1 5 ms/60 ms, de-ess (add --lowpass 16kHz to also cut the top) (highpass=60Hz, ratio=4:1, attack=5ms, release=60ms, deess=on)

Global options

Every command also accepts the global options (-o, --json, --dry-run, --overwrite, --progress, ...). See Global options.

Exit codes

CodeMeaning
0Success
1Processing failed
2Usage or parameter error
3Input missing or unreadable
4Unsupported format or codec
8Cancelled
70Internal error (bug)

Common mistakes

  • Forgetting that outputs are never overwritten: pass --overwrite or a new -o path when re-running.
  • Beat-based times (4b, 1/4) need a tempo: pass --bpm or write 4b@120.
  • Percentages accept 80% or the fraction 0.8; a bare 80 means 80x, not 80%.
  • Gains need a unit when not in dB: 0.5x is a factor, -6 and -6dB are decibels.

For models

  • MCP tool: ferraus_compress
  • Schema: ferraus schema compress
  • Pipeline: { op: compress, args: { ... } } (flag names with _ instead of -)
  • fx stage: yes
{"command": "compress", "defaults": {"threshold": "-18dB", "ratio": "3:1", "attack": "10ms", "release": "100ms", "knee": "6dB", "makeup": "auto", "lookahead": "5ms", "detector": "rms", "sidechain_hpf": "80Hz", "mix": "100%", "character": "clean", "deess": "off"}}