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
| Flag | Type | Default | Meaning |
|---|---|---|---|
--curve | text | -100:-100,-40:-50,0:-10 | Transfer curve as input:output dB points, e.g. -100:-100,-20:-20,0:-10 |
--spline | on|off | on | Smooth the curve through the points (on) or join them with straight lines (off) |
--attack | time | 10ms | Detector attack time |
--release | time | 100ms | Detector release time |
--lookahead | time | 5ms | How far ahead the gain reacts (time); no added latency |
--detector | rms | peak | rms | Level detector |
--band | text | 20Hz..20kHz | Frequency band the detector listens to (low..high) |
--mix | percent | 100% | 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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Processing failed |
| 2 | Usage or parameter error |
| 3 | Input missing or unreadable |
| 4 | Unsupported format or codec |
| 8 | Cancelled |
| 70 | Internal error (bug) |
Common mistakes
- Forgetting that outputs are never overwritten: pass
--overwriteor a new-opath when re-running. - Beat-based times (
4b,1/4) need a tempo: pass--bpmor write4b@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%"}}