Jump to content
The Dark Mod Forums

Ambient Volume


Springheel

Recommended Posts

I know people have mentioned this in the past, but it seems like some of the ambient tracks are really loud. Some of them are so loud that I have to turn down the ambient volume just to be able to hear my footsteps, and that shouldn't be required by default. They seem to be all at the default volume in the soundshaders. Does anyone mind if I reduce the volume in the soundshaders of some of the worst ones?

Link to comment
Share on other sites

I know people have mentioned this in the past, but it seems like some of the ambient tracks are really loud. Some of them are so loud that I have to turn down the ambient volume just to be able to hear my footsteps, and that shouldn't be required by default. They seem to be all at the default volume in the soundshaders. Does anyone mind if I reduce the volume in the soundshaders of some of the worst ones?

 

Oh PLEASE DO! Goodness this has been one of the worse bugs for me... that and the ambient slider doesn't work properly to boot.

Link to comment
Share on other sites

@Gold, we think we've tracked the bug to ONLY missions that use location_settings. Which unfortunately are a great way to do sound and light changes. SO at least we know where the issue with the slider lies. (don't know if you knew or not).

 

@Spring. When I was messing with that I tried volume -40 and -60 on some specific sounds like mansion_outside_02 (close to that if not exact) and it seemed to have NO effect in game. But then again, maybe location_settings just permanentely overrides that stuff.

Maybe I didn't do it right either.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

@Gold, we think we've tracked the bug to ONLY missions that use location_settings. Which unfortunately are a great way to do sound and light changes. SO at least we know where the issue with the slider lies. (don't know if you knew or not).

 

@Spring. When I was messing with that I tried volume -40 and -60 on some specific sounds like mansion_outside_02 (close to that if not exact) and it seemed to have NO effect in game. But then again, maybe location_settings just permanentely overrides that stuff.

Maybe I didn't do it right either.

 

We should still have all the ambients at the same volume levels at default, for continuities sake.

Link to comment
Share on other sites

Yes, the ambient slider has definitely worked for me. It has worked in Builder's Influence at least once, which does use locations--however, that was not using a saved game, which seems to be what causes the problems.

Link to comment
Share on other sites

Yes, the ambient slider has definitely worked for me. It has worked in Builder's Influence at least once, which does use locations--however, that was not using a saved game, which seems to be what causes the problems.

 

 

hmm, I'll check that again myself. I usually quick save early, but can't recal if I had reloaded any of said missions by the time it was 'too loud'

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Hmm, adding a "volume" spawnarg to the ambient soundshader seems to have no effect; at least not in Builder's Influence. It could be a Location issue, however, as the volume sounds higher in game than the actual ogg file does when played with something else.

Link to comment
Share on other sites

Hmm, adding a "volume" spawnarg to the ambient soundshader seems to have no effect; at least not in Builder's Influence. It could be a Location issue, however, as the volume sounds higher in game than the actual ogg file does when played with something else.

 

The location code does this:

 

float fadeInVolume = locEnt.getFloatKey( "volume" );

 

However, it does take "volume" from the info_location, not from the soundshader! That means that the sound shader loudness is not taken into account when fading to the sound:

 

fadeSound( channel2, fadeInVolume, fadeInDuration );
// re-fade-in the (previous-previous) ambient on channel 2 to become the present ambient again.

 

I would have to look up what the ambient menu slider in the menu does, and how it affects the sounds, probably it only affects currently playing sounds, meaning that's why you need to "reslide" it after entering a new location.

 

In any event, the location code needs to be fixed, probably reading the ambient volume out of the CVAR and then multiplying (?) it to the fadeInVolume value it gets from the location.

 

Basically it should do:

 

* get volume from ambient location

* get volume from menu

* multiply sound shader volume by menu value (0..1 as scaler), and from ambient location (0..1 as scaler), then use this as the fadeToVolume value.

 

However, it is also unclear how one could read out the volume from a sound shader.

 

Edit: Clarified text.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I have added code so that the menu slider should be taken into effect:

 

// tels: read out ambient volume value from menu slider (0..1.0) and multiply it to fadeInVolume (0..60)
float menu_volume = sys.strToFloat( sys.getcvar("tdm_music_volume") );
fadeInVolume *= menu_volume;

 

D3 still runs, but I did not have a suitable testmap to test this on. Please make one and test:

 

* one location without a "volume" spawnarg on the location info entity (I think this case is not handled right now, because the code should somehow default to "60", but I cannot find this place)

* one location with a "volume" set to "30"

* and one with "60" (according to a comment, the volume goes from 0..60)

 

then if you go through these, the music should be "full loud", "half loud", "full loud" and if you slide the menu slider to 50%, it should have the same relative loudness to each other, but all should be at 50%. Sliding the menu to 0 should make the music not play at all. (the code does not have a special case for this, so it might not work)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I sent demagogue a PM, but his text was not really enlightening, maybe I need more coffee?

 

One thing I thought about while talking with him is that when the initial fade to the locations ambient is done, and then the player enters the menu and changes the slider (e.g. aka changes the CVAR) this change will not be present in the ambient speaker volume, because the change will not be registered by the script. I probably need to add code that saves the CVAR value and refades whenever it changes. Dang.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I did not have a suitable testmap to test this on. Please make one and test:

 

I'm not sure who you're talking to, but I certainly don't have time to make testmaps or track down this issue right now; I've got plenty to do to get ready for 1.01.

Link to comment
Share on other sites

I'm not sure who you're talking to,

 

To anybody.

 

However, I am currently debugging it, coding the solution and testing it.

 

Things I found out so far:

 

* the ambient menu music slider goes actually from "-40" to "0" on my system, not "0..1" as the code doc says. Huh?

* it is nec. to track the cvar changes even when the location doesn't change (already implemented)

* normalized the value to "0..1" and multiply it with the fadeInVolume (already implemented)

* Edit: fixed "ambient" spawnarg description on info_location entities to be a sound, so you can use DR to choose the sound to be played

 

All what needs to be done is a testmap with ambients and me some sliding on the menu.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Ok, it should be fixed now. Please load '''maps/test/trigger_messages.map''' (might need a dmap before) and listen to the two ambient sounds in the room.

 

Then go and slide the menu slider "music volume" to various values and return to the game. The sound should react immidiately to the new value, regarldess on wether you are already longer in a location or just gone through the door in or out.

 

Only one thing to do and that is the normalization.

 

Can people please report on wether the maximum value of the music slider is:

 

* not loud enough (it should be too loud, so that you want to use maybe 2/3 of the slider), for the simple reason that weak speakers or a low volume in a map might want you to turn up the music.

* way too loud at 100% (and even way too loud at 50% etc)

* just right

 

Edit: Also, if you change the slider, then return to the game and open the console, the script will print out a message that the volume has changed. On my system that is normalized from "0.0" to "1.0" (100%). Can you please report what values it reports for you when you turn the slider to the minimum/maximum values?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

This bug is still open, tho:

 

http://bugs.angua.at/view.php?id=2099

 

Will debug this tomorrow.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Can I test this with the 1.0 build? I don't have my svn in a doom3 instal.

 

Hm, only if you copied the script and the test mission over. The script is script/tdm_location_settings.script and the testmission is maps/test/trigger_messages.map - but then, you won't have them without SVN. Uh.

 

What you can do it checkout SVN into a different folder, then rename "darkmod" to "darkmod_v1.0" and "darkmod_svn" to "darkmod". After testing, rename them back.

 

Under Linux, I have "darkmod_org" and "darkmod_release" and a symbolic link pointing to one of them, then I can just edit the link. I am pretty sure this is possible under windows, too, but I have no idea how. Create a "redirection" via right-mouse-click?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I'll try it tonight. It was the script I was wondering about.

 

I have SVN updated but not inside a doom3 folder, my Doom3 folder is a clean 1.0 instal.

 

I've been arranging my HD's so space/partitions. Now i have an old 40 g hd with svn so I need to get a doom3 instal there too for svn testing. Was just having weird issues updating svn after win7 instal and didn't want to deal with that again too soon.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Awesome Tels, great work!

 

The ambient slider works perfectly for me in that map. New game, loaded game, both sound zones. music changes volume right after I go back in game from menu.

 

Ah good news :) Does that mean that it also picks up playing the right ambient with the right volume after you do a quickload (from a different zone f.i.)? That would even better, then we could close the second bugreport, too!

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Umm, yes and no.

 

I went in again and quicksaved in the first zone, went to 2nd zone, loaded. back and forth a few times. Couldn't really pin down exactly what was happening.

 

Sometimes it seemed to load and have the correct ambient sound AND volume. Other times the correct ambient was there but very quiet. Although just tapping the slider the tiniest bit brought the sound to the correct volume. So maybe the slider can become out of synch somehow, but just touching it resets.

Minor bug I guess and it only happened maybe 50% of reloads.

 

But the slider does work, so even if I have to go to menu after a reload and tap it I'm happy with that, the volume was so loud before with ambient on 0 I actually gave up playing alot of the new missions almost instantly.

 

So now I getta play again without hearing loss biggrin.gif

 

--edit--

There actually was consistancy with it.

 

If I saved in first zone, went to 2nd and reloaded (restart in 1st) the volume was fine.

 

If I saved in 2nd zone, went back to first and reloaded the sound in 2nd zone was quite. It was only quite when reloading into 2nd zone.

 

-----

yep tried again just to be sure.

 

Save in 1st zone, reload sound is correct volume. (doesn't seem to matter if I go in and out of 2nd zone before save). So it's not going through zones that changes it, it just doesn't seem to register any zones beyond the first correctly.

 

Save in 2nd zone, reload, sound is really quite, but tapping the slider fixes it.

------

 

Also, have sound loud in 1st zone, turn ambient volume down, reload, sound is loud for a second, then drops to quiter adjusted sound.

So it does start at volume saved but drops to correct sound right away.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I guess it has to do with the first zone being the "default" zone and the second one being "different". Adding a third room would probably show that quickload only works for the first room e.g. the script doesn't know it has just been loaded into the second zone and thus plays no sound. Wonder if a script can know a game has just been loaded?

 

I'll have to debug it to see if I can fix this somehow.

 

For the "volume drops to the right volume a second later", that probably can't be fixed, as the script only runs every 1/3 or so second and that would be the time the sound is incorrect. (The speaker volume is probably restored by D3 at quickload time, then 1/3 second later the script noticed the music_volume sound is incorrect and adjusts it)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Well, the second sound DOES play still after load, just quietly, not even silent, it can be heard.

 

 

Hm, that is even more strange! I think I am going to debug it right now :D

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Added a testmap with three zones: test/ambient_sound_location.map

 

The bug (upon quickload) happens here, too. The script object is restored, it thinks the volume is all-right etc, it is just that somehow D3 messes with the sound volume on the ambient speaker. Right now I don't even know how to query the actual volume of a sound channel - then we could compare it to the volume we want it to have and adjust it.

 

Maybe needs another script event added in C++.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 4 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...