Repository navigation
Room sound weakens with distance from the source - #296
Merged
Merged
Conversation
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.
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 29, 2026
Room sound weakens with distance from the source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, ordecayTime).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.