ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Aug 25, 2019 12:36 am

All times are UTC




Post new topic  Reply to topic  [ 234 posts ]  Go to page Previous 18 9 10 11 12
Author Message
PostPosted: Sat Aug 05, 2017 5:11 pm 

Joined: Tue May 16, 2017 12:52 pm
Posts: 12
Hello.
Um guys from where could I get sx.exe (sound exchange)?and if you have it can you send it to me?
Thanks a lot. :)


Top
   
PostPosted: Thu Jan 24, 2019 2:13 am 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
Alright after 2 years without a capable PC im back. Im currently investigating/modding NFS Pro Street .tmx sounds.

The tmx has both gin files and the snr format which can only be opened in audacity but some guy on this forum said it wasn't possible to encode custom files back, need confirmation on this one though. The game has no issues reading modified tmx files, gin files can be any size or length.

SNR format is pretty much used for tones of the rpm range, much like the .abk format in previous games so unless someone makes an encoder, we're not 100% able to accurately modify sounds.

There are some float values present in the header, some very obvious ones which im 90% sure they are related to the rpm range of the sound set and others which have unknown purpose but I still think they're related to sound properties only. Luckily there is no assembly code in the .tmx format unlike the older .abk.

On the subject of using custom gin files, it isn't as straight forward as in NFSMW or Carbon, where you could hear the modified audio clearly almost with no changes or differences. In this game it's different, the audio files change a lot. (Needless to say that there are much more in-game parameters to try and modify from the database using this tool https://nfs-tools.blogspot.com/2017/09/nfs-vlted-v45-released.html I didn't even start playing with it though)


But going back to the files, it's hard for me to really pinpoint what's really happening with the audio. My test is simple, I swapped the gin acceleration file with a locomotive idling sound.

It's easy to recognize the sound in game, but it's morphed to something entirely different; I will upload a short video tomorrow maybe.

If someone wants to start testing things up just reply here, im gonna see what's possible with this game


Top
   
PostPosted: Fri Jan 25, 2019 4:03 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 876
V12-POWER wrote:
My test is simple, I swapped the gin acceleration file with a locomotive idling sound.

i recommend swapping it with human speech, it will allow you to know exactly what happens with the sound
thats what i did when researching GIN files


Top
   
PostPosted: Sun Jan 27, 2019 1:14 am 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
id-daemon wrote:
i recommend swapping it with human speech, it will allow you to know exactly what happens with the sound
thats what i did when researching GIN files


thats a better alternative for sure lol. Haven't had time though to upload the video but will do in these days


Top
   
PostPosted: Mon Jan 28, 2019 12:49 am 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
Here it is, an example of what happens with the sound files. I modified the exhaust file which seems to be the one with priority over engine sound file. Used a donald trump speech (lol) and there's the result. He sounds like a cheap chipmunk remix I don't know why does this happen, but it is not the encoder that's giving a corrupt file. This is car_026-exhaust.tmx file for those interested, the acceleration gin file is the last one so it's pretty easy to test modified audio files.

https://youtu.be/TCvde7XwN08

original sample:

152 elements
32khz
max rpm 6596
min rpm 1210

modified sample:

152 elements
32khz
max rpm 6596
min rpm 1210


Edit: shit I guess the pitch change is done by the game .exe and not done in the files and their parameters. I even tried using a lower pitched version of the speech but it sounds the same anyways. Different data for these audio parameters doesn’t work also
Or it could be that the gin file is pitched according to the high rpm tone which is a SNR audio file.
Strange thing is I can import these files to audacity but don’t know which format it is so I can’t modify these

EDIT 2: Yes sadly the pitch change is done by something else. Not the SNR audio files, not the tables in the header and not in the game database values, it is the exe doing it im 80% sure. fukkk


Top
   
PostPosted: Sat Mar 16, 2019 6:41 pm 

Joined: Wed Dec 09, 2015 11:59 am
Posts: 27
I trying in NFSU2 but tools didn't work... Idk maybe I do something wrong or tools didn't support U2 but It's possible to simple tool?


Top
   
PostPosted: Thu Mar 28, 2019 5:14 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 876
V12-POWER wrote:
Here it is, an example of what happens with the sound files.

I dont understand whats wrong here. Why do you think it must be different?
It seems this sound is supposed to be like this.


Top
   
PostPosted: Thu Mar 28, 2019 9:06 pm 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
id-daemon wrote:
V12-POWER wrote:
Here it is, an example of what happens with the sound files.

I dont understand whats wrong here. Why do you think it must be different?
It seems this sound is supposed to be like this.


Not really, because when you add an actual engine sound sample you hear it totally different, sounds like a high pitched hiss, yet the original/un-modded sample sounds the same in game and after decoding. The original sample of the sound set is audible and it's correct. It's when you remove it and put a different one back in that this happens.

And for some reason, making the modified sample have a lower pitch/deeper voice still sounds very high pitched in game, so source file pitch is irrelevant it seems. Also, the ENGINE sound set is fine with different audio samples, they sound the same in audacity and in game, the EXHAUST set causes this problem (on this car)


Top
   
PostPosted: Fri Mar 29, 2019 5:46 am 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 876
Ok then, if i understand correctly, this game analyzes the sample pitch, and shifting it like its supposed to be in game.

It must be set with some parameters, just like you said. It can't be set in EXE.


Top
   
PostPosted: Sat Mar 30, 2019 8:00 pm 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
id-daemon wrote:
Ok then, if i understand correctly, this game analyzes the sample pitch, and shifting it like its supposed to be in game.

It must be set with some parameters, just like you said. It can't be set in EXE.


EDIT: Found what causes the pitch change. The infamous tables of the gin file, it seems the game expects both tables to have certain values. If you use the original tables with a modified sample it works. This comes with a problem though, the sample will not be played correctly.

Same test as the video above, same file, same car, same sample, only difference is, im now using default gin tables. The sample plays correctly but not on it's entire length, you can listen to the video and see it plays the whole speech. "...but we have people that are stupid" as it's supposed to do.

Now, it plays the sample till the "...but we have pe-" part, it's lacking a good part of it.

While we solved one thing, we opened another can of worms, damn

EDIT2: The pitch can be manipulated using different number of elements for the table, depending on the sample rate and sample length. General rule is longer sample bigger table, higher sample rate bigger table, etc. But, oddities can happen, I have extracted the following from a few mins of file extracting and etc, the first and second have similar lengths but they differ in the number of elements, you would expect the smaller sample to have less elements, but its the opposite, the rest all follow the longer = bigger rule.

Y = ELEMENTS
X = SAMPLE LENGTH

Y = 175, X = 4415ms // 32kHZ
Y = 151, X = 4607ms // 32kHZ
Y = 173, X = 5183ms // 32kHZ
Y = 386, X = 11604ms // 32kHZ
Y = 194, X = 6965ms // 44.1kHZ
Y = 219, X = 7848ms // 44.1kHZ
Y = 629, X = 13003ms // 44.1kHZ

Now I might do something so that editing these files is easier...doing it all by hand takes way too much time, should be easy now that the format is easy and has all the necessary data, if someone is wondering, here is what I have so far

0x00 - Id, long

now we skip some bytes since theyre useless for this

0x58 - data block 1 size/offset, gin/snr section begins after this
0x5c - data block 1 + gin/snr section size (audio data begins after this)

skip all the bytes till the offset given in 0x58, Gin and SNR section begins, each sample present in the file has an string of 36 bytes in ths section. It's easy to guess the number of audio files by just doing 0x5c - 0x58 and dividing by 36.

anyways, to the small section here.

0x00 - file format
0x04 - file enumeration (first file is always 00)
0x08 - audio data offset. To get the actual offset in the file, you must add the value you got frmo 0x5c at the beginning to this one

skip 8 bytes

0x14 - random byte is always 01

skip 4 bytes

0x1c - RPM of sample, used for SNR files since they're supposed to be recorded at a static rpm, gin files use a value of 1000


skip 4 bytes

0x24 next audio file string...

The only problem here is to obtain the size of the last sample. Its easy to get the size of the files before the last one, just substracting one offset from another gives the file size, but for the last one we only have the offset - even though we know it goes all the way to the end of the file.


Top
   
PostPosted: Sun Mar 31, 2019 7:26 pm 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
id-daemon wrote:
I don't know how it may not be important, it depends on file size and it contains the sample numbers from the audio. This example for Ferrari having 149237 samples

Image

first array is always 51 numbers

Image

size of the second depends on file size and forms a curve


May I know where or how did you generate the graphs?

Uh and the SNR files can be decoded, but cant be encoded back with ffmpeg...is an encoder anywhere to be found? I know people use ea layer to encode SNR codec 5 but thats another format you see..


Top
   
PostPosted: Mon Apr 01, 2019 5:16 pm 

Joined: Sun Mar 22, 2015 7:09 pm
Posts: 876
V12-POWER wrote:
May I know where or how did you generate the graphs?

i dont remember
these are excel graphs, it means i got their data from some files


Top
   
PostPosted: Tue Apr 02, 2019 12:16 pm 

Joined: Thu Jul 02, 2015 10:43 pm
Posts: 71
So this is what the custom sounds, sound like. For some strange reason they are a distorted mess, for some other reason, human speeches sound fine in game after fixing the pitch (Not 1 to 1, but close enough) Here's an example.

https://www.youtube.com/watch?v=xiajpcdTx6E&

If this is a problem while encoding, then that's way out of my skills, I can't do anything about that, so it's open to anyone who wants to keep on with it. The source file is from GRID Autosport btw.

It is not a problem with parameters, neither the source files, all files from GRID sound distorted in game

id-daemon wrote:
V12-POWER wrote:
May I know where or how did you generate the graphs?

i dont remember
these are excel graphs, it means i got their data from some files


Ok, ty.


Top
   
PostPosted: Mon May 27, 2019 9:28 am 

Joined: Sun May 26, 2019 2:40 pm
Posts: 1
I have a question.
How can I see the number of elements in the decoded .GIN?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 234 posts ]  Go to page Previous 18 9 10 11 12

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited