ferraus analyze clipping

Count and locate clipped runs

Synopsis

ferraus analyze clipping <input> [options] [-o <output>]

What it does

A clipped run is at least --min-run consecutive samples at or above --threshold with the same polarity. Flat-topped runs below the threshold (audio clipped and then turned down) are reported with kind 'flat'.

Examples

Clipped runs with channel and time

ferraus analyze clipping take.wav --json

Count near-full-scale runs of two or more samples in a loud master

ferraus analyze clipping master.wav --threshold -0.1dB --min-run 2 --json

Report every sample at full scale, even single ones

ferraus analyze clipping old_transfer.wav --min-run 1

Options

FlagTypeDefaultMeaning
--thresholdgain0dBFSClip level
--min-runinteger3Consecutive samples that count as a clipped run Range: 1..1000.

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_analyze_clipping
  • Schema: ferraus schema analyze clipping
  • Pipeline: { op: analyze clipping, args: { ... } } (flag names with _ instead of -)
  • fx stage: no
{"command": "analyze clipping", "defaults": {"threshold": "0dBFS", "min_run": "3"}}