I did not find any other reports about this problem, so here it goes:
In Minecraft, the sounds that are far away from the player seem too intense. And when the sound is played a bit further away, it abruptly gets quiet (See graph 1). This has to do with the fact that Minecraft uses a linear way of calculating sound intensity for the distance. In real life, it is more like a curve. See attached graphs.
It's just a minor thing, and easy to fix, but still a noticeable flaw.
EDIT: This is what the calculation should be:
SoundVolume = 1 / ( Distance^2 - 1 )
This creates a curve similar to graph 2. SoundVolume = 1 means 100%, 0.5 means 50% etc.
When Distance is 0, SoundVolume is 100%. When the distance increases, the SoundVolume decreases.
This shouldn't be too hard to implement.
Linked issues
Attachments
Comments 12
Minecraft only supports linear sound attenuation at the moment:
ISound.java
public static enum AttenuationType
{
NONE("NONE", 0, 0),
LINEAR("LINEAR", 1, 2);
----
}
This is a pretty big deal in my book. Even though Minecraft is not Real Life™, in a 3D environment, we expect that sound should behave somewhat realistically.
Using a linear EQ with a low pass filter on sound sources as they recede from the player would help address the issue, even if the true solution is the curve in the graph above, in addition to EQ (the filter emulating absorption from the air, if we assume a uniform temperature).
Indeed, a low pass filter would help A LOT, and is actually a great idea. Being a programmer myself, I do not see much difficulties in changing the sound emulator to a curve, but with both effects the result would be amazing! Really, really nice idea, actually.
Most of the sfx in the game could benefit from a low pass filter, even for sound sources that are relatively close to the player. I hear players on YouTube who bemoan the sfx as "harsh" or "annoying" all the time; a low pass filter EQ would help greatly in reducing that by taking off the edge a little bit.
To say nothing of when a sound source is obstructed...
Cannot technically confirm, but can say that I have experienced behavior similar to what you are describing in 1.16.5.
Can confirm in 1.17.1. Here is an interesting way to reproduce this: in a creative world,
1. Set an observer clock facing into an empty dispenser and start facing the dispenser.
2. Run /give @s repeating_command_block
3. Paste the command execute at (your name) run tp (your name) ~-0.03 ~ ~
4. Listen to the sounds. They do not fade out smoothly, in a logarithmic scale as you would expect, but in a linear scale.
may relate to MC-141201
It's not that I don't trust your measurements, but how did you collect the data for those graphs?