ferraus distort

Distortion from drawn transfer curves

Synopsis

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

What it does

Maps each sample through a transfer curve drawn as 'in:out' points, with separate curves for the positive and negative half-waves (asymmetric distortion). Points are linear amplitudes (0.5) or dB (-6dB); an implicit 0:0 point anchors the curve and inputs beyond the last point hold its output (hard clip). --smooth joins points with a smooth monotone curve instead of straight lines. dB points below -range are clamped to -range. saturate is the musical default; this is the precise tool.

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

Examples

Gentle symmetric soft clipping

ferraus distort gtr.wav -o fuzz.wav

Asymmetric: compress only the positive half-wave

ferraus distort bass.wav --curve-pos "-20dB:-14dB,-6dB:-4dB,0dB:-3dB" --curve-neg "0.5:0.5,1:1" -o dirty.wav

A hard, angular curve with straight segments for a gritty edge

ferraus distort synth.wav --curve-pos "0.2:0.5,0.5:0.8,1:0.9" --smooth off -o hard.wav

Blend the default soft clipping in parallel for subtle grit

ferraus distort vox.wav --mix 30% -o vox_dirty.wav

Options

FlagTypeDefaultMeaning
--curve-postext0.25:0.3,0.5:0.55,0.75:0.7,1:0.75Positive half-wave curve as in:out points (linear or dB)
--curve-negtextsameNegative half-wave curve as in:out magnitudes, or 'same' to mirror --curve-pos
--smoothon|offonSmooth curve through the points (on) or straight segments (off)
--rangegain60dBLowest level in dB that dB-valued points can describe
--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.
  • Gains need a unit when not in dB: 0.5x is a factor, -6 and -6dB are decibels.

For models

  • MCP tool: ferraus_distort
  • Schema: ferraus schema distort
  • Pipeline: { op: distort, args: { ... } } (flag names with _ instead of -)
  • fx stage: yes
{"command": "distort", "defaults": {"curve_pos": "0.25:0.3,0.5:0.55,0.75:0.7,1:0.75", "curve_neg": "same", "smooth": "on", "range": "60dB", "mix": "100%"}}