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

FlagTypeDefaultMeaning
--max-offsettime1sLargest alignment offset searched
--no-alignflag—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

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.
  • Beat-based times (4b, 1/4) need a tempo: pass --bpm or write 4b@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"}}