Every claim on this page comes from a reproducible test. Methodology is disclosed. Numbers are small, precise, and from the actual engine — not a handpicked example.
A naive limiter clips every transient peak that breaches the ceiling — symmetrically, without context. The attack flattens. The snare loses its crack. Velnor's chain runs three transient-aware stages before the limiter touches anything: the TransientPreservedClipper shapes the body without touching onset peaks, the SoftClipper handles residual density, and the TransientIntegrityGuard applies a pre-limiter Gaussian compensation pulse to each detected onset. The pulse amplitude is derived from the predicted gain reduction over a 2 ms lookahead window — enough to anticipate limiter action without introducing overshoot or ringing at the onset boundary. The limiter sees a signal that has already been shaped around its transients — not one that needs them brutally flattened.
This is stronger as a measurement proof than a casual listening demo. The evidence below shows the same limiter ceiling holding while crest collapses under naive clipping and survives under Velnor's transient-aware path. The naive hard clip baseline is intentionally simple — it isolates what the limiter ceiling alone does to transients, without competing variables. A well-configured commercial limiter will perform better than the baseline, but still operates without the pre-shaping stages that are Velnor's actual differentiator.
Loading...
backend/tests/generate_tig_proof.py
Sample: hihats 120bpm reverb snare-11.wav by @realdavidfloat — CC0
AI-generated music frequently contains unstable sub-bass: two slightly detuned low frequencies in opposite stereo channels creating a beat cycle (typically 1–3 Hz). In stereo it sounds wide but unstable, the two frequencies fight each other. Hit Mono on the original and the fake width collapses, exposing the 2 Hz pulse directly. That pulsing throb is the problem.
Velnor's stereo shuffler detects L/R correlation below 0.3 in the sub band and collapses sub content below 80 Hz toward phase coherence. The result is a corrected output whose sub region is nearly mono, stable, and centred, without the beat cycle. Hit Mono on the Velnor version and very little changes because the unstable side content has already been removed. That is the test it passes.
Listen on headphones or speakers that preserve stereo width. If your playback chain folds stereo toward mono, the original fault is partly hidden and the difference becomes much harder to hear.
Signal: Left channel = 30 Hz pure sine (amplitude 0.85).
Right channel = 32 Hz pure sine (amplitude 0.85).
Duration: 15 s. Sample rate: 44100 Hz.
This creates a 2 Hz beat cycle, identical to the kind of
phase-unstable sub-bass produced by AI music generators (Suno, Udio).
Measurement: stereo Pearson correlation coefficient over full signal,
sub-band filtered (20–80 Hz).
Correction path: sub-band mono anchor + stereo shuffler width clamp.
The engine detects correlation < 0.3 in the sub band and gradually
narrows the stereo image below 80 Hz until coherence is restored.
Expected outcome: the corrected file remains slightly stereo overall,
but the sub region is close to mono, so the Mono switch produces very
little additional change.
Source file: backend/tests/generate_bass_torture.py::test3_ai_phasey_sub
backend/tests/generate_bass_torture.py — test 03
Multiband processing requires splitting a signal into frequency bands and recombining them. Naive Butterworth splits introduce comb-filter notches at crossover points — audible as tonal artefacts. Velnor uses Linkwitz–Riley 4th-order (LR4) filters with allpass phase compensation. The reconstruction error is below machine precision.
Signal: White noise, 65536 samples, SR 44100 Hz. Split into 3 bands: 0–300 Hz / 300–3000 Hz / 3000–22050 Hz. Recombined by summing all three bands. Reconstruction error: max(|original - reconstructed|) across all samples. The <1e-9 threshold is the standard used in academic DSP literature for "correct" all-pass filter reconstruction (see Zölzer, "DAFX"). Independent verification: test runs the LR4 implementation against a reference all-pass constructed from scipy.signal.butter, comparing both magnitude response and phase response.
backend/tests/test_modules.py::TestCrossover.test_full_signal_path
AAC encoding can produce inter-sample peaks (ISP) that exceed the PCM true-peak ceiling — meaning a -1.0 dBTP master can decode to -0.78 dBTP on Spotify. Velnor's Codec QC loop detects this after encoding and trims the PCM ceiling in a correction pass. It resolves all known ISP scenarios within 2 passes.
| Test Case | PCM Before | PCM After | AAC TP Est. | Passes | Compliant |
|---|---|---|---|---|---|
| Loading test results... | |||||
Five synthetic PCM signals representing different ISP risk profiles: safe_silence: pure silence — no overshoot possible safe_conservative: band-limited content well below ceiling marginal: content near the ceiling but sub-ISP threshold stress_hf_dense: 10–16 kHz dense content near ceiling (worst ISP risk) stress_transient: percussive transient at ceiling Codec QC loop: 1. Estimate AAC true-peak from PCM via 4x oversampled interpolation 2. If estimated TP > ceiling: trim = overshoot + 0.15 dB safety margin 3. Re-check. Repeat up to 2 passes. All five cases resolve within 2 passes. No case requires a third pass. The correction only fires when the overshoot is detected — clean signals (safe_silence, safe_conservative) receive zero correction.
backend/tests/test_modules.py::TestCodecQC.test_full_signal_path
AAC and MP3 decoders can reconstruct inter-sample peaks that exceed the PCM ceiling — a -1.0 dBTP master can decode to -0.78 dBTP or higher on a streaming platform, causing distortion that was never in the original file. Velnor's adaptive ceiling mitigates this without applying a blanket penalty to every master. Before the limiter runs, it reads crest factor, high-frequency energy (the primary ISP risk factor), and genre archetype confidence, then adjusts the ceiling only where the signal genuinely needs the headroom. The floor is -2.0 dBTP — it never trades more loudness than the risk justifies, and lossless delivery receives no adjustment at all.
Six test signals with different spectral and dynamic profiles. Each runs through AdaptiveCeiling._apply_adaptive_ceiling(). Nudge factors applied cumulatively: Crest < 6 dB (crushed dense mix) → −0.4 dB Crest 6–8 dB (medium density) → −0.2 dB HF energy ratio > 20% (bright content) → −0.1 dB dense_and_loud archetype score > 0.45 → −0.1 dB club_ready archetype score > 0.45 → −0.1 dB Floor: never below −2.0 dBTP Lossless delivery: ceiling not adjusted Worst case: dense club material with high HF energy. All five factors fire. Ceiling = −1.0 − 0.4 − 0.1 − 0.1 − 0.1 = −1.7 dBTP. This gives 0.7 dB more headroom for AAC reconstruction overshoot.
backend/tests/test_modules.py::TestAdaptiveCeiling.test_full_signal_path
The limiter is tested with an independent 8× oversampled true-peak detector — not the limiter's own metering. This eliminates circular verification. Tests are designed to escape: ISP traps, intermodulation scenarios, lookahead edge cases, and silence/short-file stability.
Each test constructs a synthetic signal designed to stress a specific failure mode of true-peak limiters: ISP scenarios: signals where codec reconstruction exceeds PCM peak Transient escapes: fast attack transients that outrun the lookahead Intermodulation: dual-tone combinations near ceiling Edge cases: silence, short files, Nyquist-frequency content No-crude-clipping: output must not contain hard clipping artefacts Independent detector: _ref_true_peak_db() — a separate 8x oversampled true-peak measurement function, not derived from the limiter's own gain-reduction path. Pass criterion: peak ≤ −1.0 dBTP for all samples, no hard clipping.
backend/tests/test_limiter_adversarial.py — 29 tests
These are not one-time benchmarks. The adversarial limiter suite, module integration evidence, and codec QC proof on this page were rerun against the current engine. Numbers here reflect the current proof assets, not a cherry-picked baseline.