Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

.gin and .abk sound formats (Need for Speed mw 2005)(help)

Featured Replies

  • Author
  • Localization

V12-POWER, posted Mon Jan 28, 2019 12:49 am (42856)


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
  • Replies 237
  • Views 27
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

zimex25, posted Sat Mar 16, 2019 6:41 pm (45833)


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?
  • Author
  • Localization

id-daemon, posted Thu Mar 28, 2019 5:14 pm (46146)


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.
  • Author
  • Localization

V12-POWER, posted Thu Mar 28, 2019 9:06 pm (46154)


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)
  • Author
  • Localization

id-daemon, posted Fri Mar 29, 2019 5:46 am (46160)


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.
  • Author
  • Localization

V12-POWER, posted Sat Mar 30, 2019 8:00 pm (46213)


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.
  • Author
  • Localization

V12-POWER, posted Sun Mar 31, 2019 7:26 pm (46283)


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..
  • Author
  • Localization

id-daemon, posted Mon Apr 01, 2019 5:16 pm (46340)


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
  • Author
  • Localization

V12-POWER, posted Tue Apr 02, 2019 12:16 pm (46379)


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.
  • Author
  • Localization

chung390, posted Mon May 27, 2019 9:28 am (48063)


I have a question.
How can I see the number of elements in the decoded .GIN?
  • Author
  • Localization

LBPPlayer7, posted Sat Mar 14, 2020 12:56 pm (54629)


This page has screenshots from the AEMS editor. Sure, it's not from an NFS game, but it's still the same audio engine used for engine audio from ABKs. This could possibly clear up some small things about the ABKs.
http://designingsound.org/2010/01/27/au ... ts-part-2/
  • Author
  • Localization

BrahmaBull, posted Thu Dec 30, 2021 6:03 am (68552)


Hello, has anyone been trying to follow V12's tutorial on youtube and failing?

Im stuck to the step 2, where you need to use the start.bat to convert your wav files into gin files.
For some reason when I run the start.bat, program is working on the cmd, but when its done I have no gin files at all like they appear on the video:

That is frustrating, I really want to replace some audio files on nfs hot pursuit remastered.
  • Author
  • Localization

YaroslavTsapov, posted Tue Feb 01, 2022 6:46 pm (69550)


Hi anyone, who still live:) I need in your help, brothers. The tutorial is interested, but i didn't understand since 3 years ago to today how to return .gin and .abk format from .wav files. If V12 POWER didn't delete his videos on YouTube, may be i understood this earlier. but now i don't know: how to convert modified or original .wav to .abk and .gin...:(
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.