View previous topic :: View next topic |
Author |
Message |
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Sat Dec 28, 2013 10:24 am Post subject: Support for SNDINFO attenuation |
|
|
Currently there is no way to control the sound volume falloff over distance. SNDINFO has this in zdoom which is missing from zdaemon:
$ambient 1 attentest point 0.0 periodic 1.0 1.0
The above code defines a point sound playing from ambient sound 1 thing, with no attenuation, playing periodically (per sec) with full volume.
(attenuation is the float number after point keyword, and it is optional)
and
$attenuation aliasname value
This is a generic approach, since you can control any sound's attenuation defined in SNDINFO, not just ambients.
and which would be really nice to have:
$rolloff soundname <mindist> <maxdist>
Quote: |
Sets the attenuation for the sound. <mindist> (default 200) is the distance from the center of the sound trigger at which the sound is played at full volume, after which the sound drops off in volume until it hits <maxdist> (default 1200) is the distance at which the sound becomes inaudible. This allows different sound curves to be defined on a per-item basis. |
http://zdoom.org/wiki/SNDINFO |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Fri Aug 26, 2016 3:36 pm Post subject: |
|
|
Don't like to bump my own post but lacking the control of sound attenuation is really bad. To simplify the request lets concentrate on one feature only:
Code: | $attenuation aliasname value |
Defines a multiplication factor for sound attenuation. Giving a value of zero will result in a sound that is always played with no attenuation, that is to say at full volume.
from http://forum.zdoom.org/viewtopic.php?f=3&t=51408#wrap
Attenuation is done by multiplying the sound's distance by the attenuation value and using that as the distance in volume calculations.
For example:
If attenuation is 2, then the volume at a particular distance from a sound will be the same as the volume two times further for the same sound with an attenuation of 1.
If attenuation is 0.5, the the volume you hear will be the same as the volume at half the distance when the attenuation was 1.
Example definition:
Code: | machinery/pointsound DSMCHSND
$attenuation machinery/pointsound 2.0 |
As per above definition, the sound volume of machinery/pointsound will fall off twice as fast with distance compared to the same definition with standard 1.0 attenuation. |
|
Back to top |
|
|
Aeyesx Dominating!
Joined: 13 Oct 2012
|
Posted: Tue Aug 30, 2016 10:06 am Post subject: |
|
|
There is old DeHackEd value that can customize volume (or fade?) of sound. It could possibly be used to work-around this but either maybie not. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Sun Mar 18, 2018 8:08 pm Post subject: |
|
|
From d_dehacked.cpp in 1.06 source:
Code: | // The only remotely useful thing Dehacked sound patches could do
// was change where the sound's name was stored. Since there is no
// real benefit to doing this, and it would be very difficult for
// me to emulate it, I have disabled them entirely. |
Apart from the above comment, sound patches used to control sound priorities. Although I've never seen such dehacked patches in action, I guess the priority was used to determine which sound to play when more sounds are to be played on the same channel simultaneously. However, there is / was no setting to control sound falloff in dehacked at all. That is a job for SNDINFO.
The lack of sound attenuation control feature becomes quite disturbing on maps with a lot of things emitting sounds at once. |
|
Back to top |
|
|
Aeyesx Dominating!
Joined: 13 Oct 2012
|
Posted: Sun Mar 18, 2018 8:14 pm Post subject: |
|
|
Body-Guard wrote: | From d_dehacked.cpp in 1.06 source:
Code: | // The only remotely useful thing Dehacked sound patches could do
// was change where the sound's name was stored. Since there is no
// real benefit to doing this, and it would be very difficult for
// me to emulate it, I have disabled them entirely. |
Apart from the above comment, sound patches used to control sound priorities. Although I've never seen such dehacked patches in action, I guess the priority was used to determine which sound to play when more sounds are to be played on the same channel simultaneously. However, there is / was no setting to control sound falloff in dehacked at all. That is a job for SNDINFO.
The lack of sound attenuation control feature becomes quite disturbing on maps with a lot of things emitting sounds at once. |
I am pretty sure the syntax was as follows
Code: | Sound 16 //Simply SoundNum
Value = 45 // 0-255 |
So you can confirm that this is disabled ? If so I would learn something new. Gotta test. |
|
Back to top |
|
|
Krawa There is a limit
Joined: 23 Nov 2008 Location: #SDA
|
Posted: Sat Oct 20, 2018 8:28 pm Post subject: |
|
|
Moved to accepted. ($volume, $attenuation and $rolloff) |
|
Back to top |
|
|
Krawa There is a limit
Joined: 23 Nov 2008 Location: #SDA
|
|
Back to top |
|
|
Aeyesx Dominating!
Joined: 13 Oct 2012
|
Posted: Wed Oct 31, 2018 9:14 am Post subject: |
|
|
This is simply too great. You guys are literally pushing me to start actually doing something while I am becoming work-o-holic sorta in my job |
|
Back to top |
|
|
|