Custom distance-based reverb mix

Moderator: GZDoom Developers

Post Reply
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Custom distance-based reverb mix

Post by Nash »

New SNDINFO property:

$reverbattenuation sound_name, min_distance, max_distance, min_wet_mix, max_wet_mix

Sets the reverb "attenuation"* for the sound. min_distance is the distance from the center of the sound source at which the reverb is played with a mix amount of min_wet_mix, after which the reverb mix gradually increases until your distance hits max_distance, where the reverb's mix amount will be capped at max_wet_mix.

Distance is in map units, while reverb mix is a percentage (0 to 100)

* I use the term "attenuation" in this post but I'm not sure if this is technically correct, from OpenAL's point of view. I simply use a term that is commonly understood in ZDoom's modding ecosystem (longtime ZDoom modders have come to understand that "attenuation", in sound terms, relates to the sound distance). The name isn't set in stone of course; other suggestions are most definitely welcome. :)



Can be used to achieve an effect similar to the Fallout 3 trailer (as the camera moves farther from the radio, the reverb mix increases). :)



Of course there are other use cases. Being able to dial in the amount of reverb per-sound is useful tool to have in a sound designer's arsenal.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Custom distance-based reverb mix

Post by Enjay »

Sorry to interrupt a feature suggestion with a more general question but I've seen lots of mentions of a "wet path" and "dry path" in these reverb-related discussions. I've tried to figure out what these actually mean via Google but a simple explanation eludes me. It doesn't seem to be quite as straight-forward as the names imply to me. I don't suppose you could sum it up could you?
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Custom distance-based reverb mix

Post by Rachael »

Nash can correct me if I am wrong but - I think it has to do with how the sound is reflected. Wet surfaces, since they are coated with a surface of water, reflect sounds much more reliably; the reflection is also more crisp and less muffled, depending on of course any obstacles which may absorb the reflecting sound or possibly even oscillate or resonate it.

Dry surfaces I would guess are the opposite - they still reflect sound, but they're more subject to frequency bias, and tend to reverb shorter except with certain frequencies.

But I am no sound expert so that is just my guess.
User avatar
phantombeta
Posts: 2089
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Custom distance-based reverb mix

Post by phantombeta »

I believe "wet path" means the sound with effects (i.e., with reverb) and "dry path" means the unmodified sound (i.e., no reverb), and the "dry/wet mix" is the ratio of how much either is used in the final mix.
So what Nash wants is to control how the sound fades between being "normal" to having reverb.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Custom distance-based reverb mix

Post by Nash »

phantombeta got it right. :)

Apologies in advance for the confusion; it's terminology used often in the audio world, but probably not heard too often outside of it (understandable!).

Skip to 2:03 for a quick demonstration:



Or listen to these:

User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Custom distance-based reverb mix

Post by Chris »

Enjay wrote:Sorry to interrupt a feature suggestion with a more general question but I've seen lots of mentions of a "wet path" and "dry path" in these reverb-related discussions. I've tried to figure out what these actually mean via Google but a simple explanation eludes me. It doesn't seem to be quite as straight-forward as the names imply to me. I don't suppose you could sum it up could you?
"Dry path", also called "direct path" or "dry/direct response", describes the portion of a sound that comes direct from the source to the listener. It's the part of the sound that's unaffected by the environment*. It hasn't been processed by the reverb effect. The "wet path", also called the "room path" or "wet/room response", describes the portion of a sound that has reflected off of the walls or other surfaces at least once before the listener hears it. It's what has been processed by the reverb effect.

* Technically the dry/direct path is affected by the transmission medium (air and atmosphere), but in this context it means it hasn't bounced off of any walls or surfaces before hearing it. If you turn reverb off or set a "no reverb" preset, you get just the direct response.
Nash wrote:New SNDINFO property:

$reverbattenuation sound_name, min_distance, max_distance, min_wet_mix, max_wet_mix

Sets the reverb "attenuation"* for the sound. min_distance is the distance from the center of the sound source at which the reverb is played with a mix amount of min_wet_mix, after which the reverb mix gradually increases until your distance hits max_distance, where the reverb's mix amount will be capped at max_wet_mix.
This is backwards to how it's supposed to work. A sound in the distance doesn't get more reverb than a sound up close. What happens is, a sound in the distance has a more audible room response relative to the direct response, allowing the reverb to stand out more in the distance (obstructions blocking the dry path but not the wet path also helps reverb to stand out). It's not that the reverb goes away as you get closer to the sound source, it's that the dry sound starts overpowering the reverberation, making the latter harder to hear. But the reverberation does get quieter as you move away from the sound source.
Nash wrote:Can be used to achieve an effect similar to the Fallout 3 trailer (as the camera moves farther from the radio, the reverb mix increases). :)
That's a more complex audio scene than can be described by this. It's applying custom effects and adjusting them "manually" along side the accompanying visuals to create the intended mood. The reverb applied to the radio near the end of the pan-out is more of a dreamy (or hellish) reverb than one that's trying to simulate a radio in a ruined empty cityscape. And the way the reverb fades in doesn't really equate with distance, but more with what the viewer sees. There's actually other sounds in the scene that have a different and more "accurate" reverb to them (the electrical crackling of the radio as it turns on, gunshots/explosions in the background during the song).

Implementing a way to do this in GZDoom in real-time would require handling multiple reverb effects, being able to specify which reverb(s) to play a sound with, and scripting additions that can control the dry and wet mixes of a sound more directly.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Custom distance-based reverb mix

Post by Enjay »

Thank you kindly. The various posts on this topic make much more sense to me now.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Custom distance-based reverb mix

Post by Graf Zahl »

Chris wrote: Implementing a way to do this in GZDoom in real-time would require handling multiple reverb effects, being able to specify which reverb(s) to play a sound with, and scripting additions that can control the dry and wet mixes of a sound more directly.

That part essentially means "no".
This is so niche that the feature barely matters for Doom. In all those years I have only seen a handful of mods using sound environments, and even less which make some intelligent use of them.

It's certainly not among those things I am willing to invest time in.
User avatar
Caligari87
Admin
Posts: 6174
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Custom distance-based reverb mix

Post by Caligari87 »

No one uses them because they're incredibly limited and awful to use, especially mixing multiple environments, and have been since day one. It's a chicken-and-egg problem.

Scripting controls for sound environments would make them a lot more viable and attractive.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Custom distance-based reverb mix

Post by Graf Zahl »

Find me a sound programmer who is willing to implement this and we may talk again. In the bigger scheme of things it's simply not worth the effort.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”