ferraus dynamics

Transfer-curve dynamics: compressor, expander, and gate from one curve

Synopsis

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

What it does

Maps the detected input level to an output level through a curve of 'input:output' dB points (a slope below 1 compresses, above 1 expands, a drop to -100 gates). Outside the points the curve continues at unity slope. --spline smooths the curve through the points. The detector can be limited to a frequency band with --band; the gain is applied to the full signal, with lookahead so attacks are caught. The rms detector reads a full-scale sine at -3 dBFS.

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

Examples

2:1 compression above -20 dB

ferraus dynamics vox.wav --curve "-100:-100,-20:-20,0:-10" -o comp.wav

A gate at -50 dB from the same command

ferraus dynamics drums.wav --curve "-100:-100,-50:-100,-45:-45,0:0" --spline off --detector peak -o gated.wav

2:1 compression above -30 dB that only reacts to the low end (40-250 Hz)

ferraus dynamics bass.wav --curve "-100:-100,-30:-30,0:-15" --band 40Hz..250Hz --detector peak -o bass_comp.wav

Gentle downward expansion below -40 dB, with no compression above

ferraus dynamics vox.wav --curve "-100:-100,-60:-70,-40:-40,0:0" --attack 2ms --release 150ms -o vox_exp.wav

Options

FlagTypeDefaultMeaning
--curvetext-100:-100,-40:-50,0:-10Transfer curve as input:output dB points, e.g. -100:-100,-20:-20,0:-10
--splineon|offonSmooth the curve through the points (on) or join them with straight lines (off)
--attacktime10msDetector attack time
--releasetime100msDetector release time
--lookaheadtime5msHow far ahead the gain reacts (time); no added latency
--detectorrms | peakrmsLevel detector
--bandtext20Hz..20kHzFrequency band the detector listens to (low..high)
--mixpercent100%Dry/wet balance: 0% returns the input unchanged, 100% is fully processed

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.

For models

  • MCP tool: ferraus_dynamics
  • Schema: ferraus schema dynamics
  • Pipeline: { op: dynamics, args: { ... } } (flag names with _ instead of -)
  • fx stage: yes
{"command": "dynamics", "defaults": {"curve": "-100:-100,-40:-50,0:-10", "spline": "on", "attack": "10ms", "release": "100ms", "lookahead": "5ms", "detector": "rms", "band": "20Hz..20kHz", "mix": "100%"}}