Jump to content


Photo

Stereo Zoned Ambients Need a Stereo silence.ogg Leadin Sound

sound

  • Please log in to reply
8 replies to this topic

#1 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 24 May 2017 - 09:55 AM

*
POPULAR

Most zoned ambients, when used in place of regular ambient sounds, sound considerably worse. It does not matter whether they are coming off a speaker or from the location system. I encountered this way back when working on King of Diamonds and even pointed it out on the forums, but nobody seemed to take notice. I used non-zoned ambients in KoD for this precise reason, which led to complaints about the loud popping you hear when you don't use _z ambients. Now I've come to a head when implementing location settings in my new FM and I cannot deal with the pop-in anymore. I've debugged this issue myself, leading to this discovery.

 

The leadin "silence.ogg" is needed for zoned ambients to properly fade in and out when used in the location system. Currently, this sound file is in mono format. ALL ambient sounds that we have in stereo format are currently suffering great audio quality loss when used in combination with a mono leadin.

 

The easy solution to this problem is this: convert "silence.ogg" from a mono to a stereo file. Most our (good) music is in stereo, so this will fix the issue - I tested it personally. However, just as a mono leadin will ruin a stereo sound, testing revealed that a stereo leadin also ruins a mono sound. If we're to be rigorous, there must be two silence leadin files: "silence.ogg" and "silence_stereo.ogg". In the ambience_zoned.sndshd file, the appropriate leadin must be declared depending on the type of file. I've no idea how to batch check for numbers of channels on lots of audio files, so this may prove to be arduous gruntwork.

 

Nevertheless, I highly suggest that at least the easy fix get applied for the next update. The quality gain from fixing a bunch of stereo sound is much greater than ruining a handful of mono sound.

 

---

 

See the bugtracker report I've filed here.

 

If you want to test this yourself, I've provided a stereo "silence.ogg" for your convenience. Place it in "sound/ambient/ambience/" to override the default one. An example stereo ambient to test the change is "forest_children_z". An example mono one would be "hum_intense03_loop_z". You can immediately test the difference in sound in-game by renaming this custom "silence.ogg" to e.g. "silence_diffname.ogg" after you've placed it and typing "realoadSounds" in the console while near a speaker emitting either of those two sound shaders.

 

Attached File  silence.ogg.txt   4.04KB   0 downloads


Edited by Spooks, 24 May 2017 - 10:01 AM.

  • grayman, nbohr1more, Goldwell and 4 others like this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#2 kingsal

kingsal

    Member

  • Member
  • PipPip
  • 178 posts

Posted 24 May 2017 - 11:00 AM

Oh man, I was just trying to figure this out the other day! Thanks Spooks!

 

I couldn't for the life of me figure out why my ambient tracks where playing at a lower sample rate. I thought it had something to do with transitioning from a mono to stereo ambient. I didn't even think to look at the silence file.



#3 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18453 posts

Posted 24 May 2017 - 11:25 AM

Thanks for that Spooks, will check with the team before I got ahead and add this to the core mod.



#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5168 posts

Posted 25 May 2017 - 04:59 AM

I'll crosspost this from the internal thread for the public record.

 

I'm the one that originally decided to use the silence.ogg "leadin" to stop the popping problem.

(It was actually only a guess. I was never 100% sure it stops the problem or if it's confirmation bias. The pop-in will happen or not also depending on if the incoming ambient is very loud or not at the start, and possibly other issues that I don't even know about. But I at least had rational grounds to believe leadin works the way the problem works.)

 

But anyway, all of that is aside from the main point here.

It seems spooks really figured out stereo depends on having a stereo leadin.
In that case, it should be an easy yes to allow the switch IMO.

There was no rational reason I used mono in the first place except that it was fast to make & didn't occur to me it'd be a problem.


Posted Image

#5 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 358 posts

Posted 25 May 2017 - 06:48 AM

By my guesses the pop in happens only when you enter a zone for the first time or when you travel between three zones fast. The latter case is fixable by setting your 2foip spawnargs to a longer fadein/out. The former I could only guess happens because even though the sound shaders are supposed to be "precached" they still load for the first time, making them skip fadeins. Perhaps making the sound shaders consist of two files makes the system load both, skipping the fade on the silence (which doesn't cause a pop, obviously) but it still works for the song proper. Again, all conjecture.


My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#6 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18453 posts

Posted 25 May 2017 - 08:30 AM

There was no rational reason I used mono in the first place except that it was fast to make & didn't occur to me it'd be a problem.

So just a case of replacing the silence.ogg file then..?



#7 Xarg

Xarg

    Advanced Member

  • Member
  • PipPipPip
  • 1311 posts

Posted 25 May 2017 - 08:44 AM

Seems to me you'd be better off keeping the original and substituting the new one into the stereo ambients, but that'd likely be a lot more work.


Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

 


#8 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18453 posts

Posted 25 May 2017 - 11:40 AM

Seems to me you'd be better off keeping the original and substituting the new one into the stereo ambients, but that'd likely be a lot more work.

As I understand it, all the ambient's are stereo files - so unless silence.ogg is used with any non-ambient's its shouldn't be an issue to direct replace the file.



#9 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18453 posts

Posted 25 May 2017 - 11:41 AM

Seems to me you'd be better off keeping the original and substituting the new one into the stereo ambients, but that'd likely be a lot more work.

Assuming all the ambient's are stereo files, unless silence.ogg is used with any non-ambient's its shouldn't be an issue to direct replace the file.







Also tagged with one or more of these keywords: sound

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users