ferraus compare
Null test: align b to a and report RMS and peak difference and SI-SDR
Synopsis
ferraus compare <inputs...> [options] [-o <output>]
What it does
b is aligned to a by FFT cross-correlation (within --max-offset), resampled and channel-matched if needed, then compared sample by sample: RMS and peak of the difference, null depth, best-fit gain, SI-SDR of b against a, and loudness difference. The agent's regression test.
Examples
Confirm nothing was damaged
ferraus compare mix.wav master_v1.wav --json
Sample-for-sample null test of a format round trip
ferraus compare original.wav roundtrip.wav --no-align --json
Allow up to five seconds of offset when the files start at different times
ferraus compare stem_sum.wav mix.wav --max-offset 5s
Options
| Flag | Type | Default | Meaning |
|---|---|---|---|
--max-offset | time | 1s | Largest alignment offset searched |
--no-align | flag | — | Compare sample for sample without alignment |
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_compare - Schema:
ferraus schema compare - Pipeline:
{ op: compare, args: { ... } }(flag names with_instead of-) - fx stage: no
{"command": "compare", "defaults": {"max_offset": "1s"}}