ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How to get stereo audio working in SoC

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  22:39:17  18 October 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
 

Message edited by:
Daemonion
10/18/2012 22:50:17
Messages: 567
Tut: How to get stereo audio working in SoC

Why?
Shadow of Chernobyl is filled with audio that only plays in mono. While mono has it's uses, a game world needs stereo audio, as well, in order to feel complete. Mono by itself gives a very compressed feeling.

Mono is good for:
- 3D position sounds (static sound sources in XRay)
- Dialogue directly from an NPC
- Environmental "one-shot" sounds (dogs barking, etc)
- Weapon mechanical noises (reloading, the bolt cycling, etc)

Stereo is good for:
- Environmental ambiance (wind, crickets, rain)
- Music
- Weapon reports/reverberation (the reflections off the environment)

When using these together, you can create a very full sound stage. As the lead audio designer for LURK 1.2, I knew I had to get stereo audio working in SoC.

Here is a file I made for my space restrictor work in LURK.
Stereo: http://snd.sc/Q5hsg3
Mono: http://snd.sc/XunACN


How?
Stereo files are made up of a left channel and a right channel. Mono has only a center channel. A stereo file is a combination of these left and right channels.

SoC's XRay engine can't actually use a stereo file like in CoP. Instead, they came up with the idea to use two mono files affixed with a _l and _r. The engine was then *supposed* to use an algorithm to play a _l file only in the left channel, and a _r file only in the right channel. This would make it sound as though stereo audio was playing, even though it was two separate mono tracks. This never worked, in-game, though. Until now.

****
Note you can't just use any old mono track. You need to start with a true stereo file and convert it's left and right channels into separate mono tracks. This way, you have a left channel mono file and a right channel mono file.
****

You will need to get your stereo sounds converted to split-track mono .ogg files (don't forget to comment them properly). I use Audacity to split a stereo track into two channel-dependent tracks. To split the tracks:

1) Open the stereo file in Audacity. http://i.imgur.com/ujXIx.jpg

2) Select "Split Stereo Track" in the track drop-down menu. http://i.imgur.com/oTuHq.jpg

3) The tracks will now be split. Select one by double clicking on it. It will turn gray. http://i.imgur.com/gyG1r.jpg

4) Export each track separately. http://i.imgur.com/wizSy.jpg

5) Make sure to label the left channel track with _l and the right channel track with _r


You will need to replace your gamedata/scripts/sr_sound2d.script with my new sr_sound2d.script text at the bottom of the post.

Lastly, you will need a new wrap_oal.dll file, as the left and right channels are swapped with the vanilla .dll. Also included at the bottom of the post.


Files
Place this new wrap_oal.dll into your /bin directory:
http://www.putlocker.com/file/F25A3A0B952E4D97

Replace your sr_sound2d.script with this (back up your old file!)
http://www.putlocker.com/file/6176A055B976A430
or
http://pastebin.com/HL6VpTkE


Enjoy!

Thanks to:
Malandrinus
Artos
NatVac
AMK Forums
GSC Forums
  22:51:28  18 October 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133
Excellent, I enjoyed reading your previous thread, I found it very insightful about SoC's puzzling, and unintuitive nature of handling audio.
  22:54:12  18 October 2012
profilee-mailreply Message URLTo the Top
ddraig
Senior Resident
 

 
On forum: 06/19/2012
Messages: 158
Thanks man, you're the best!

Can't wait to hear what the controller presence stuff sounds like with actual stereo sound.

I bet booming thunder would sound pretty cool with it aswell.
  23:02:47  18 October 2012
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
 

Message edited by:
Daemonion
10/18/2012 23:03:48
Messages: 567

---QUOTATION---
I bet booming thunder would sound pretty cool with it aswell.
---END QUOTATION---


I think you'll enjoy some of the weather audio I've been recording for LURK.

Here are some of my favorite lightening strikes I've recorded (unedited):
http://snd.sc/XurwUf

and where I almost got hit by lightening (15ft away from me and my mics):
http://snd.sc/XurFqK
  23:42:30  19 October 2012
profilee-mailreply Message URLTo the Top
Meltac
messing with code
(Resident)

 

 
On forum: 01/21/2010
Messages: 1519
Thanks for the tutorial, stuff like that is always very welcome
  10:35:26  9 March 2014
profilee-mailreply Message URLTo the Top
HugePanda
(Senior)
 
On forum: 07/16/2011
Messages: 50
Hi,

I'm looking for this mod since few months... but all links are dead, especially for wrap file

Is there anyone here who can help me to download stereo mod please ? Many Thx in advance !!
  02:58:14  26 March 2014
profilee-mailreply Message URLTo the Top
Xeros612
Senior Resident
 

 
On forum: 01/05/2010
Messages: 681
Seconding the notion here, as I don't know for sure if the .dll files I have spare are the correct ones. I've got a mirror that won't likely go down in the meantime.

https://onedrive.live.com/redir?resid=F0B18C055C82D169!128&authkey=!ADPrBMtS78elYnw&ithint=folder%2c.txt
  19:57:56  26 March 2014
profilee-mailreply Message URLTo the Top
Daemonion
All About Audio
(Resident)

 

 
On forum: 09/27/2011
 

Message edited by:
Daemonion
03/26/2014 20:04:21
Messages: 567
Sorry for my late response!

Here is the newer wrap_oal.dll: http://1drv.ms/1eQflvq

Open your vanilla gamedata/scripts/sr_sound2d.script (make a backup copy) and paste this version (or just my changes): http://pastebin.com/HL6VpTkE


---QUOTATION---
Hi,

I'm looking for this mod since few months... but all links are dead, especially for wrap file

Is there anyone here who can help me to download stereo mod please ? Many Thx in advance !!
---END QUOTATION---


Just to clarify this mod doesn't actually change any of the existing audio in the game. This is more of a modder's resource for people who want to create and implement their own stereo sounds.

An example of this is the level music. Even though the vanilla level music is given _l and _r attributes, it actually won't ever play in stereo because of how it was converted. Using the method above, a modder could take a new stereo music file, turn it into two mono _l and _r variants, and then put it in the game. These changes will make it functionally sound the same as stereo.

Just putting in the new .dll and script changes won't make anything sound different on its own.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.