I think I know a bit where sounds come from

Research & development for the PSForever architecture.
User avatar
KingFeraligatr
Posts: 91
Joined: Tue Oct 20, 2015 12:51 am

I think I know a bit where sounds come from

Postby KingFeraligatr » Tue Oct 20, 2015 1:08 am

I did a bit of poking around in the game files before, and I think I know the nature of where non-music sounds come from. The main game, Core Combat ("expansion1" folder), and every patch that added sounds ("patch1-5" folders) all have their own master sounds file (all .wav files). For the unpatched game, the file is called 3sounds. For the patches and CC, the sound file name corresponds to its folder name. These files contain practically every sound in the game. There also seems to be an accompanying and same named ".idx" file. I think the game is set up so that when a sound needs to play for an action, that sound is taken from X:XX time to Y:YY time, which may be defined in the .idx file (but I don't know). If I'm not being clear, tell me and I can explain better. Just thought you might want to know this info. Also, there's a low sounds folder with the same structure and file names named as their normal ones, just with a <name>_lo adde to the file name. They also have an accompanying .idx file.

Also, my audio digging found unused sound files for attacking AMSes, defending AMSes, defending spawn tubes/room (there's one voice over for tubes and one for spawn room), etc. There may be more though. I don't feel like listening to an hour long file and other smaller ones to confirm.
The King of Feraligatrs and the Typo Master.
BR 30, CR 3 NC, Gemini
RIP PS1. Long live PSForever.
User avatar
Chord
Site Admin
Posts: 162
Joined: Wed Oct 14, 2015 4:31 pm
Contact:

Re: I think I know a bit where sounds come from

Postby Chord » Thu Oct 22, 2015 5:50 pm

KingFeraligatr wrote:I did a bit of poking around in the game files before, and I think I know the nature of where non-music sounds come from. The main game, Core Combat ("expansion1" folder), and every patch that added sounds ("patch1-5" folders) all have their own master sounds file (all .wav files). For the unpatched game, the file is called 3sounds. For the patches and CC, the sound file name corresponds to its folder name. These files contain practically every sound in the game. There also seems to be an accompanying and same named ".idx" file. I think the game is set up so that when a sound needs to play for an action, that sound is taken from X:XX time to Y:YY time, which may be defined in the .idx file (but I don't know). If I'm not being clear, tell me and I can explain better. Just thought you might want to know this info. Also, there's a low sounds folder with the same structure and file names named as their normal ones, just with a <name>_lo adde to the file name. They also have an accompanying .idx file.

Also, my audio digging found unused sound files for attacking AMSes, defending AMSes, defending spawn tubes/room (there's one voice over for tubes and one for spawn room), etc. There may be more though. I don't feel like listening to an hour long file and other smaller ones to confirm.


Thanks for that info. 3dsounds.wav is quite fun to listen too :) I've listened to it for kicks once.
Do you have any programming experience?
[ PSForever admin and developer ]
PSForever Code | Capturing Packets | Community Discord
User avatar
KingFeraligatr
Posts: 91
Joined: Tue Oct 20, 2015 12:51 am

Re: I think I know a bit where sounds come from

Postby KingFeraligatr » Fri Oct 23, 2015 8:03 pm

Chord wrote:Do you have any programming experience?

I have some programming and modding experience and know the basics, but have never done anything complex. I don't consider myself motivated, focused, knowledgeable, etc. enough to handle a project of this scale. I guess I could help here and there, but I don't know how that would cut into my personal time, gaming, and modding. But yeah, I know enough about programming to do the basics.
The King of Feraligatrs and the Typo Master.
BR 30, CR 3 NC, Gemini
RIP PS1. Long live PSForever.
User avatar
Chord
Site Admin
Posts: 162
Joined: Wed Oct 14, 2015 4:31 pm
Contact:

Re: I think I know a bit where sounds come from

Postby Chord » Fri Oct 23, 2015 10:19 pm

KingFeraligatr wrote:
Chord wrote:Do you have any programming experience?

I have some programming and modding experience and know the basics, but have never done anything complex. I don't consider myself motivated, focused, knowledgeable, etc. enough to handle a project of this scale. I guess I could help here and there, but I don't know how that would cut into my personal time, gaming, and modding. But yeah, I know enough about programming to do the basics.

Okay, that's fine! Just hang around and when I get the code for the tools, you can browse around. The launcher and logger are written in C# and I'm still considering my options for the server-side. C++ is my first choice, but a lot can go wrong and scaling is hard.
[ PSForever admin and developer ]
PSForever Code | Capturing Packets | Community Discord
User avatar
FateJH
Posts: 95
Joined: Mon Nov 02, 2015 8:37 am

Re: I think I know a bit where sounds come from

Postby FateJH » Mon Nov 02, 2015 11:31 pm

KingFeraligatr wrote:There also seems to be an accompanying and same named ".idx" file. I think the game is set up so that when a sound needs to play for an action, that sound is taken from X:XX time to Y:YY time, which may be defined in the .idx file (but I don't know).

That seems to be correct. The idx file format is "name.wav # # # #" (a filename followed by four numbers). The third number always seems to be 22050 and the last number always seems to be 16.

The first three entries in /patch1/patch1.idx follows:

Code: Select all

emp_doppler.wav 0 310784 22050 16
emp_fire.wav 310784 182318 22050 16
emp_phase.wav 493102 114562 22050 16

The first number is when the audio starts and the second number is how long the audio goes on. You can add the first two numbers in one row to get the first number in the next row. The fun part is that the accompanying wave file for patch1 is 8352990 bytes on disk and the final entry starts at 8286626 and goes for 66320. 8352946. The remainder is 44, which is the size of wave file header iirc. :D
The third number might be sampling rate. 22050 is commonly known as half the sampling rate of audio CDs.
The fourth number might be bit depth, or bits per sample (which defines a short datatype). WAV files commonly are 8-bit 16-bit or 32-bit.

Since this is a flat file, we might be able to test this by changing the number to other other format acceptable numbers and then performing the action that calls the sound, as long as the application allows us.
VS: FateJH, BR 21 CR 0 TR: FJH, BR 18 CR 1 NC: FateJHNC, BR 14 CR 0
User avatar
Chord
Site Admin
Posts: 162
Joined: Wed Oct 14, 2015 4:31 pm
Contact:

Re: I think I know a bit where sounds come from

Postby Chord » Thu Nov 05, 2015 1:10 am

FateJH wrote:
KingFeraligatr wrote:There also seems to be an accompanying and same named ".idx" file. I think the game is set up so that when a sound needs to play for an action, that sound is taken from X:XX time to Y:YY time, which may be defined in the .idx file (but I don't know).

That seems to be correct. The idx file format is "name.wav # # # #" (a filename followed by four numbers). The third number always seems to be 22050 and the last number always seems to be 16.

The first three entries in /patch1/patch1.idx follows:

Code: Select all

emp_doppler.wav 0 310784 22050 16
emp_fire.wav 310784 182318 22050 16
emp_phase.wav 493102 114562 22050 16

The first number is when the audio starts and the second number is how long the audio goes on. You can add the first two numbers in one row to get the first number in the next row. The fun part is that the accompanying wave file for patch1 is 8352990 bytes on disk and the final entry starts at 8286626 and goes for 66320. 8352946. The remainder is 44, which is the size of wave file header iirc. :D
The third number might be sampling rate. 22050 is commonly known as half the sampling rate of audio CDs.
The fourth number might be bit depth, or bits per sample (which defines a short datatype). WAV files commonly are 8-bit 16-bit or 32-bit.

Since this is a flat file, we might be able to test this by changing the number to other other format acceptable numbers and then performing the action that calls the sound, as long as the application allows us.


Welcome to PSForever!

Just a guess, but you sound like you know your way around an IDE.
[ PSForever admin and developer ]
PSForever Code | Capturing Packets | Community Discord
User avatar
FateJH
Posts: 95
Joined: Mon Nov 02, 2015 8:37 am

Re: I think I know a bit where sounds come from

Postby FateJH » Mon Nov 09, 2015 12:10 am

Chord wrote:Welcome to PSForever!

Just a guess, but you sound like you know your way around an IDE.

I am a professional software developer.
At least, I think I am a professional software developer. I have a paper framed to the wall that says I am and I have a resume to corroborates this assertion. ;)
I usually work with C++ or Java.
VS: FateJH, BR 21 CR 0 TR: FJH, BR 18 CR 1 NC: FateJHNC, BR 14 CR 0
User avatar
Chord
Site Admin
Posts: 162
Joined: Wed Oct 14, 2015 4:31 pm
Contact:

Re: I think I know a bit where sounds come from

Postby Chord » Sat Nov 14, 2015 11:02 am

FateJH wrote:
Chord wrote:Welcome to PSForever!

Just a guess, but you sound like you know your way around an IDE.

I am a professional software developer.
At least, I think I am a professional software developer. I have a paper framed to the wall that says I am and I have a resume to corroborates this assertion. ;)
I usually work with C++ or Java.


Great! Stick around, once the code starts flowing, fun will be had.
[ PSForever admin and developer ]
PSForever Code | Capturing Packets | Community Discord
Ryathorz
Posts: 115
Joined: Sat Nov 28, 2015 6:52 am

Re: I think I know a bit where sounds come from

Postby Ryathorz » Thu Dec 17, 2015 4:23 pm

There are a few oddities in there - the magriders main gun appears to use fp_pulsar_tailoff for instance.
void
Posts: 9
Joined: Sat Mar 12, 2016 6:07 pm

Re: I think I know a bit where sounds come from

Postby void » Sat Jul 02, 2016 2:53 pm

Hope I might be able to join in on the fun from time to time. :)

I know C++ and can work with C# as long as it doesn't get too deep (some obscure subtleties - although I'm more than willing to learn new things).
I still consider myself a programmer-in-training, though, so keep that in mind.

Return to “R & D”

Who is online

Users browsing this forum: No registered users and 1 guest