Skip to content

Room sound weakens with distance from the source - #296

Merged
ctoth merged 1 commit into
masterfrom
fix/reverb-feed
Nov 29, 2026
Merged

ctoth merged 1 commit into
masterfrom
fix/reverb-feed

Conversation

@ctoth

@ctoth ctoth commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

What changes

A positioned sound's send to its room reverb was raised to cancel the direct sound's distance loss exactly, so the room sound was the same wherever the source stood. The compensated send is now multiplied by exp(-0.02 r / T), with r the listener-to-source distance in metres and T the room chain's 1 kHz reverberation time (the fourth of decayTimes, or decayTime).

Why

A room's decay cannot begin before the direct sound arrives, so a listener farther from the source has already lost that much of the decay: reflected energy is the classical value times exp(-0.04 r / T) (Barron & Lee 1988, JASA 84(2), Eq. 6). The formula was fitted to halls of 2,900 m3 and up; it is applied here on its physical argument, and the code comment says so.

For a 3.81 x 5.13 x 2.44 m living room with T = 0.345 s: 0.5, 1.0 and 1.5 dB less room sound at 1, 2 and 3 m.

Unchanged

A sound routed to a chain with no reverb decay time, a non-positioned sound, and ambisonic routes.

Tests

Unit tests for the factor and for reading the chain's 1 kHz reverberation time.

The send to a room chain is still raised to undo the distance gain, and is
now also multiplied by exp(-0.02 r / T), r the listener-to-source distance
and T the chain reverb's 1 kHz reverberation time (Barron & Lee 1988,
Eq. 6): a source's reverberant decay starts when its direct sound arrives.
In the Living Room (T 0.345 s) the room sound falls 0.5, 1.0 and 1.5 dB at
1, 2 and 3 m. Chains without a reverb decay time and sounds that are not
point sources are unchanged.
@ctoth
ctoth merged commit 3d06f6c into master Nov 29, 2026
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 29, 2026
Room sound weakens with distance from the source
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