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.
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.
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
- Select exactly one Sound in Praat.
- Run
Gravitational_Lens_Reverb.praat. - Choose a preset, or choose Custom to use the form values.
- Set Wet_dry_percent: 0 = dry only, 100 = wet return only.
- Enable Draw_visualization if you want the waveform and spacetime/ray diagram.
- Click OK. The result is named
original_gravitational_Preset.
Presets
| Preset | Tail | Masses × rays | Curvature | Lensing | Dilation | Decay | Early refl. |
|---|---|---|---|---|---|---|---|
| Subtle Lensing | 2.5 s | 6 × 5 | 0.5 | 0.12 | 0.10 | 1.8 | 6 |
| Medium Lensing | 4.0 s | 12 × 8 | 0.8 | 0.16 | 0.15 | 1.5 | 8 |
| Heavy Lensing | 5.5 s | 18 × 12 | 1.1 | 0.20 | 0.20 | 1.2 | 10 |
| Extreme Lensing | 7.5 s | 25 × 16 | 1.5 | 0.24 | 0.25 | 1.0 | 12 |
| Black Hole | 10.0 s | 8 × 20 | 2.5 | 0.30 | 0.35 | 0.6 | 15 |
Presets also set mass-strength statistics, ray-delay spacing, early-reflection density and fadeout. Wet_dry_percent, visualization and playback remain user controls.
Parameters
| Parameter | Default | Meaning in the current implementation |
|---|---|---|
| Tail_duration_s | 4.0 | Appended output tail and approximate IR duration. |
| Mass_points | 12 | Number of random mass positions. Positions are drawn uniformly from 0.03–0.9 s. |
| Rays_per_mass | 8 | Number of recursive ray contributions generated for each mass. |
| Space_curvature | 0.8 | Scales the extra delay produced by the bending term. |
| Mass_strength_mean / stddev | 1.2 / 0.5 | Gaussian mass-strength distribution; values below 0.1 are clamped to 0.1. |
| Ray_delay_start_s | 0.05 | Base of the straight-delay sequence. The first ray uses start + one increment. |
| Ray_delay_increment_s | 0.06 | Spacing between successive straight-ray delays. |
| Lensing_amplitude | 0.16 | Base ray gain before bending-dependent amplification and exponential decay. |
| Time_dilation_factor | 0.15 | Controls the multiplicative delay contraction derived from mass strength. |
| Decay_rate | 1.5 | Exponential attenuation versus curved delay. |
| Early_reflections | 8 | Number of short recursive reflections added before the ray network. |
| Early_reflection_density | 0.008 | Base spacing of the early reflections; each delay is also randomized ±10%. |
| Fadeout_duration_s | 1.0 | Cosine fade at the end of the appended tail; limited to the tail duration. |
| Wet_dry_percent | 60 | Clamped to 0–100 and used as a linear dry/wet crossfade. |
IR and processing engine
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
- Stereo source: separate left and right IRs are rendered. The right IR receives additional small random perturbations, so the wet field is decorrelated.
- Mono source: one mono IR is used and the result remains mono.
- 3+ channels: one shared mono IR is applied independently to all source channels; the original channel count is preserved.
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.
Output and visualization
- Name:
original_gravitational_Preset. - Duration: original duration +
Tail_duration_s. - Sample rate: preserved.
- Time domain: processing uses a zero-based working copy, so the result is zero-based rather than preserving a non-zero source
xmin. - Randomness: mass positions/strengths, early-reflection perturbations and stereo decorrelation use Praat random functions with no exposed seed; repeated runs can differ.
- 0% wet: dry source plus silent tail; if the dry peak exceeds 0.95, the final safety ceiling attenuates it.
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.