Compare onset groups to find distinguishing waveform/spectral features (separation analysis)
<command-name>audio-separate</command-name>
Compare groups of onset samples to find which waveform/spectral features best separate them. Uses Cohen's d (standardized mean difference) and overlap analysis.
/audio-separate bwv147-restart-prefix-01 --real 1.87,3.15,5.06 --compare 4.16
/audio-separate --config /path/to/samples.json
Parse the user's request to determine the mode:
Run the analysis script:
# Quick mode
uv run python scripts/audio-analysis/onset_separation_analysis.py \
--audio <fixture-or-path> --real <times> --compare <times>
# Config mode
uv run python scripts/audio-analysis/onset_separation_analysis.py \
--config <path>
Interpret the results:
Report:
| Category | Features |
|---|---|
| Energy | rms_ratio, broadband_gain (20ms, 80ms windows) |
| Spectral | diff_flatness, diff_crest, diff_centroid, gain_positive_frac |
| Band gains | sub_bass through brilliance (7 bands, 5ms window) |
| Harmonicity | autocorrelation (20ms, 50ms), autocorr_change |
| Waveform | crest_factor (3/5/10ms), kurtosis_20ms, post_crest_20ms |
| Transient | max_deriv_5ms, mean_deriv_5ms, crest_change |
{
"groups": {
"real": [
{"audio": "bwv147-restart-prefix-01", "onset": 1.87, "label": "E5"},
{"audio": "/full/path/to/audio.wav", "onset": 3.15, "label": "C5"}
],
"noise_trailing": [
{"audio": "a4-d4-f4-triad-repeat-01", "onset": 16.97, "label": "triad_noise"}
]
},
"reference_group": "real"
}
Different fake types (noise, residual) have fundamentally different characteristics. Always analyze per fake type — mixing types hides clean separations.
/audio-diagnose - Single onset classification/audio-spectrum - Spectral features at one onset/audio-visualize - Visual spectrogram