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
| Flag | Type | Default | Meaning |
|---|---|---|---|
--threshold | gain | 0dBFS | Clip level |
--min-run | integer | 3 | Consecutive 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
| 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. - Gains need a unit when not in dB:
0.5xis a factor,-6and-6dBare 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"}}