Skip to content

feat(binaural): reverb size and per-band decay, live up to Studio (S2-15) - #351

Merged
mgth merged 1 commit into
mainfrom
feat/binaural-reverb-bands-size
Sep 2, 2026
Merged

feat(binaural): reverb size and per-band decay, live up to Studio (S2-15)#351
mgth merged 1 commit into
mainfrom
feat/binaural-reverb-bands-size

Conversation

@mgth

@mgth mgth commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Series 2, lot 3, S2-15 — reverb size and per-band RT60, three settings wired from YAML to Studio.

  • reverb.size (0.5–2, default 1): scales every FDN delay line together (allocated for the maximum). Feedback gains follow the lengths so the RT60 is unchanged at any size. A running network stretches its lines at ≤ 0.02 samples/sample (a second-long ±2 % pitch drift, not a splice); a fresh or cleared network snaps.
  • reverb.rt60_low_ratio / reverb.rt60_high_ratio (0.25–4, default 1): decay time below ~250 Hz / above ~4 kHz as ratios of the broadband RT60. Per line, the loop gain becomes the broadband value plus two first-order shelves (trapezoidal one-poles — exact complements; the exp form only reached ~60 % of the band's gain) carrying what the band's own RT60 adds. At ratio 1 both terms are exactly zero: the default tail is arithmetically unchanged. The fixed wall damping stays underneath.
  • Cost: two one-poles per line (16 lines), no allocation, no branch.

Wiring

live_paramsconfig (render.binaural.reverb.{size,rt60_low_ratio,rt60_high_ratio}) → renderer_buildpersistosc_contract + osc (…/reverb/size, …/reverb/rt60_low_ratio, …/reverb/rt60_high_ratio) → snapshot (size, rt60LowRatio, rt60HighRatio) → BINAURAL.md (table, OSC table, a Tail character tip) → Studio: three sliders in the Late reverb block (ratios on log2 sliders), three Tauri commands, i18n ×8 (npm run i18n:check: parity).

Tests

  • size_scales_the_lines_and_keeps_the_decay, size_changes_are_slewed, band_ratios_shape_the_decay_by_band (bass ×4 → >10× longer 40–150 Hz tail; treble ×¼ → >10× shorter 4–8 kHz tail; each leaves the other band within 3 dB; band energies off a Hann-windowed FFT).
  • cargo test -p renderer --lib: 384 passed, 2 ignored. cargo test -p runtime_control: green (contract conformance included). cargo check on orender_engine and Studio's src-tauri: clean. npx vite build: OK. Golden unchanged.

Listening

Size 0.5 vs 2 at the same RT60; bass ×1.5 + treble ×0.5 against a flat decay on dialogue and on a held note.

🤖 Generated with Claude Code

@mgth
mgth force-pushed the feat/binaural-reverb-bands-size branch from 93d80fe to ead64bf Compare September 2, 2026 17:31
S2-15. The late tail had one decay time for every band and one set of
line lengths. Two more handles shape it the way a room's tail is shaped:

- `reverb.size` (0.5–2) scales every delay line together, allocated for
  the maximum: shorter lines make a small, dense room, longer ones a
  sparser, larger one. The feedback gains are recomputed with the lengths
  so the RT60 stays what was asked at any size, and a running network
  stretches its lines at no more than 0.02 samples per sample — a
  second-long ±2 % pitch drift rather than a splice (a fresh or cleared
  network snaps).
- `reverb.rt60_low_ratio` and `reverb.rt60_high_ratio` (0.25–4): the
  decay time below ~250 Hz and above ~4 kHz as ratios of the broadband
  RT60. Each line's loop gain becomes the broadband value plus two
  first-order shelves — trapezoidal one-poles, exact complements, so the
  shelf reaches its band's gain (the `exp` one-pole reached ~60 % of it) —
  whose gains are what the band's own RT60 adds to the broadband gain.
  At a ratio of 1 both terms are exactly zero: the default tail is
  arithmetically the one before the shelves existed. The fixed one-pole
  wall damping stays underneath; the high ratio acts on top of it.

`Fdn::set_params` takes the `BinauralReverb` block. Wired through
config (`render.binaural.reverb.{size,rt60_low_ratio,rt60_high_ratio}`),
engine build, persistence, OSC (`…/reverb/size`, `…/reverb/rt60_low_ratio`,
`…/reverb/rt60_high_ratio`), the state snapshot, BINAURAL.md, and Studio:
three sliders in the Late reverb block (the ratios on log2 sliders so ×0.5
and ×2 sit symmetrically about ×1), three Tauri commands, i18n ×8.

Tests: first output of a fresh network lands after the pre-delay plus the
shortest line at each size and the decay slope is size-invariant; a size
change on a running network slews at the bound and gets there; bass ×4
lengthens the 40–150 Hz tail more than tenfold and treble ×¼ shortens the
4–8 kHz tail more than tenfold, each leaving the other band within 3 dB
(band energies off a Hann-windowed FFT).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mgth
mgth force-pushed the feat/binaural-reverb-bands-size branch from ead64bf to 7cd413a Compare September 2, 2026 17:37
@mgth
mgth merged commit d92e7d1 into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant