Gravitational Lens Reverb — User Guide

Physics-inspired FastIR convolution reverb with recursive ray delays, wet-only impulse responses, multichannel handling, and a visual spacetime model.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 2.2.1 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Gravitational Lens Reverb is a physics-inspired convolution reverb. It first renders a short synthetic impulse response (IR) from a recursive network of early reflections and “gravitational rays,” then convolves that IR with the selected Sound. The ray delays and gains are shaped by randomly placed mass points, curvature, lensing gain, time-dilation scaling, and exponential decay.

Interpretation: the gravitational vocabulary is a compositional model, not a physical simulation of relativistic acoustics. Terms such as mass, curvature, lensing and time dilation control a delay-and-gain network loosely inspired by gravitational-lensing ideas.

The direct impulse is used only to seed the recursive IR network and is then removed before convolution, so the convolved path is wet-only. Wet/Dry therefore crossfades between the zero-padded dry signal and a reflections-only return.

Quick start

  1. Select exactly one Sound in Praat.
  2. Run Gravitational_Lens_Reverb.praat.
  3. Choose a preset, or choose Custom to use the form values.
  4. Set Wet_dry_percent: 0 = dry only, 100 = wet return only.
  5. Enable Draw_visualization if you want the waveform and spacetime/ray diagram.
  6. Click OK. The result is named original_gravitational_Preset.

Presets

PresetTailMasses × raysCurvatureLensingDilationDecayEarly refl.
Subtle Lensing2.5 s6 × 50.50.120.101.86
Medium Lensing4.0 s12 × 80.80.160.151.58
Heavy Lensing5.5 s18 × 121.10.200.201.210
Extreme Lensing7.5 s25 × 161.50.240.251.012
Black Hole10.0 s8 × 202.50.300.350.615

Presets also set mass-strength statistics, ray-delay spacing, early-reflection density and fadeout. Wet_dry_percent, visualization and playback remain user controls.

Parameters

ParameterDefaultMeaning in the current implementation
Tail_duration_s4.0Appended output tail and approximate IR duration.
Mass_points12Number of random mass positions. Positions are drawn uniformly from 0.03–0.9 s.
Rays_per_mass8Number of recursive ray contributions generated for each mass.
Space_curvature0.8Scales the extra delay produced by the bending term.
Mass_strength_mean / stddev1.2 / 0.5Gaussian mass-strength distribution; values below 0.1 are clamped to 0.1.
Ray_delay_start_s0.05Base of the straight-delay sequence. The first ray uses start + one increment.
Ray_delay_increment_s0.06Spacing between successive straight-ray delays.
Lensing_amplitude0.16Base ray gain before bending-dependent amplification and exponential decay.
Time_dilation_factor0.15Controls the multiplicative delay contraction derived from mass strength.
Decay_rate1.5Exponential attenuation versus curved delay.
Early_reflections8Number of short recursive reflections added before the ray network.
Early_reflection_density0.008Base spacing of the early reflections; each delay is also randomized ±10%.
Fadeout_duration_s1.0Cosine fade at the end of the appended tail; limited to the tail duration.
Wet_dry_percent60Clamped to 0–100 and used as a linear dry/wet crossfade.

IR and processing engine

For each mass and ray: straight = Ray_delay_start + ray × Ray_delay_increment bending = mass_strength / (|straight - mass_position| + 0.005) curved = straight + bending × Space_curvature ray_gain = min(0.35, Lensing_amplitude × (1 + 0.15 × bending)) ray_gain *= exp(-curved × Decay_rate) dilation = sqrt(max(0.01, 1 - mass_strength × Time_dilation_factor)) final_delay = curved × dilation

Each accepted ray is applied recursively to the IR canvas as self + gain × self(x-delay). Early reflections use the same recursive structure. Delays outside the available IR horizon or negligible gains are skipped.

The IR is approximately Tail_duration_s + one sample. After the recursive IR has been rendered, its direct sample is zeroed and Praat’s Convolve: "sum", "zero" applies the wet-only IR to the source.

Channels

Wet level and final gain

The wet path is reflections-only. The final mix is dry × (1-wet) + wetReturn × wet. A final attenuate-only safety ceiling scales the result to 0.95 only if its peak exceeds 0.95.

Current v2.2.1 implementation note: RMS calibration of the wet return is currently performed only in the stereo branch, and that stereo branch calls the calibration routine twice. In ordinary cases the second pass is near unity, but if the first pass reaches its internal 0.25×/4× clamp, the second pass can add further gain. Mono and 3+ channel processing do not run this RMS calibration step. The user guide documents this current behavior rather than the intended uniform calibration described in the script comments.

Output and visualization

When visualization is enabled, the script shows the input waveform, the complete output waveform with the original end marked, a conceptual spacetime panel with mass points/rays/dilation field, and a summary strip. The ray diagram is an explanatory rendering of the same control equations; it is not a physical ray-tracing simulation.