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

id-daemon, posted Fri Nov 25, 2016 6:03 pm (19082)


Yes, frostbite engine is hard to put files back. Not impossible though.

And yes, now I'm busy with completely different things.
  • Replies 237
  • Views 32
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

Zpectre87, posted Sun Mar 05, 2017 12:56 am (21209)


RedCarDriver wrote:
Additionally - is there any obvious procedure for getting looping extracted copies of the samples in the .gin files, or would that have to be done with editing by hand?


You'll have to splice them by hand. It's better to use sounds from NFS Carbon since the samples are really long and easier to loop.
  • Author
  • Localization

Moussa Bayou, posted Tue May 16, 2017 1:01 pm (23281)


id-daemon wrote:
Here's a GIN encoder for you. Includes new decoder too, that will also print RPM values used.

Encode with 3 parameters: wav, rpm1, rpm2

All cars use different tables, so I just made an average, that starts on sample 480 and ends on sample 900 from the end and breaks it into small loops 900 samples each with an average curve line. I can make this all as parameters if you find it useful.

If you set rpm1>rpm2 it will try making GIN file for deceleration, in which the first table values are decreasing instead of increasing. (but i never found these _DCL.GINs audible in this game). Maybe it will be useful for others.


Your gin_encode.exe won't launch in my pc anymore.When trying to open it.It will close itself.....I have Windows 7 64bit as OS.Please Help me with encoding my wav file! :(
  • Author
  • Localization

id-daemon, posted Tue May 16, 2017 2:52 pm (23282)


It must work on Win 7 64 bit. Something must be wrong with your files.
  • Author
  • Localization

Moussa Bayou, posted Wed May 17, 2017 8:42 am (23300)


id-daemon wrote:
It must work on Win 7 64 bit. Something must be wrong with your files.

Is it a .net framework problem or something?
Or I should put it in a specific directory?
  • Author
  • Localization

Moussa Bayou, posted Fri May 19, 2017 11:33 pm (23330)


id-daemon
Is there any other program to encode gin files?and if there is no other one can I send you my 2 wav files to encode them? :?
Thank you so much
  • Author
  • Localization

id-daemon, posted Sat May 20, 2017 5:29 am (23333)


Describe what are you doing and how you run gin_encode.
  • Author
  • Localization

Moussa Bayou, posted Sat May 20, 2017 11:48 am (23340)


id-daemon wrote:
Describe what are you doing and how you run gin_encode.

I've followed all your posts in this topic then recorded and created my own wav and exported as the same length and frequency as the original one.
So....I am running it by double clicking and/or by executing as administrator.And suddenly the program close it self(I'm not dragging wav files).
  • Author
  • Localization

id-daemon, posted Sat May 20, 2017 5:32 pm (23370)


you have to run it from command line with 3 parameters: wav, rpm1, rpm2
  • Author
  • Localization

id-daemon, posted Sat May 20, 2017 5:33 pm (23371)


id-daemon wrote:
You need to run it with 3 parameters. Example:

gin_encode some.wav 1500 8500
  • Author
  • Localization

Moussa Bayou, posted Sat May 20, 2017 6:48 pm (23376)


when typing my commands: Gin_encode Aventador.wav 1000 9000
It will writes this:
Usage:
GIN_encode [wav file] [rpm1] [rpm2] [elements]
So.What do elements mean?
  • Author
  • Localization

id-daemon, posted Sun May 21, 2017 5:38 am (23386)


Moussa Bayou wrote:
when typing my commands: Gin_encode Aventador.wav 1000 9000
It will writes this:
Usage:
GIN_encode [wav file] [rpm1] [rpm2] [elements]
So.What do elements mean?


oh, looks like one more parameter added for better format support. That's number of elements in GIN file, also present in output of gin_decode. Or you can specify your own value.
  • Author
  • Localization

Moussa Bayou, posted Sun May 21, 2017 12:03 pm (23391)


id-daemon wrote:
Moussa Bayou wrote:
when typing my commands: Gin_encode Aventador.wav 1000 9000
It will writes this:
Usage:
GIN_encode [wav file] [rpm1] [rpm2] [elements]
So.What do elements mean?


oh, looks like one more parameter added for better format support. That's number of elements in GIN file, also present in output of gin_decode. Or you can specify your own value.

Now.It writes Unknown Wav Format.I am still getting a corrupted GIN file with 0kb.My wav file has the same length and frequency......What am I doing wrong?
  • Author
  • Localization

id-daemon, posted Sun May 21, 2017 4:19 pm (23396)


It must be 16-bit mono wav file
  • Author
  • Localization

Moussa Bayou, posted Mon May 22, 2017 3:01 pm (23438)


id-daemon wrote:
It must be 16-bit mono wav file

It is on 22050Hz 16bit mono wav format.I still don't know why this is happening to me.
  • Author
  • Localization

Moussa Bayou, posted Mon May 22, 2017 4:41 pm (23446)


Here is the file.I will ensure you that the WAV file is in 22050Hz 16Bit Mono format with the same lenght as the murcielago(2.505 sec).Also I've tried annother one with 32000Hz sample format.But this problem still happening.CMD writes unknown wav format and the result is a 0kb Gin file. :(
  • Author
  • Localization

Moussa Bayou, posted Tue May 23, 2017 11:30 pm (23485)


Another thing.The original one has 282kb and mine has 285kb size.
  • Author
  • Localization

id-daemon, posted Wed May 24, 2017 3:09 pm (23499)


File can be any length and any frequency.

Standard WAV has format header 16 or 40 bytes. Your is 18. I have no time to look into this and support your format. Use any other WAV editor to make normal WAV files.
  • Author
  • Localization

Moussa Bayou, posted Thu May 25, 2017 2:02 pm (23511)


id-daemon wrote:
File can be any length and any frequency.

Standard WAV has format header 16 or 40 bytes. Your is 18. I have no time to look into this and support your format. Use any other WAV editor to make normal WAV files.


What is yours?Because I 'm using WavePad.
  • Author
  • Localization

V12-POWER, posted Mon Jul 10, 2017 10:53 pm (24490)


Hi everyone, seems like I thought I had talked bout .tmx formats from pro street and undercover games but turns out I didn't, anyways, sorry for being sooo late as the interest is probably dead by now

the .tmx format is used by NFS undercover and pro street, it's basically a container file (audio samples) some information in the header. It contains either GIN files with very slight differences and/or a "new" format which is named "SNR" in the files (I don't know if it is encoded using the same abk codec or not)

The small difference in the gin files is that some of them don't start in the sample 480 like all the ones from NFSMW did. They are random now, some of them start in sample 662, 720, etc. I have tried making a gin file and replacing it in the tmx but they turn out to have different sizes even though the length, sampling rate is all the same. It also killed the sound in game for me.

The header. It starts with a sequence of bytes that appear 3 times across the file. It might be assembly code or else. The first sequence has a table of offsets after it.

Image

The number of offsets is defined fr bytes 28-31 (green box in the pic). Since some of them seem to point at blank spaces of the file I will name the ones with some meaning after a quick look
Then before it, it has the offset of a small sub section where the audio files are listed. This lists the files in order and have the offset for each file, they all also some sort of value, which I don't know what it is, but it is a value in the range of 17,xxx, it is not shown in the pic.

2 offsets more which point to a blank space in the file.
2 offset point to a float value which is near the maxRPM and minRPM values used to build gin files.
Then after those, it's pretty much a guess game for me, this after looking at the file for 15 mins at most.

It also has a section where there's some bytes but their meaning is unknown to me, I have uploaded some samples
  • Author
  • Localization

V12-POWER, posted Wed Jul 12, 2017 5:38 pm (24511)


double post but this is important I guess

about the new format that appears here "SNR"

always starts with these 5 bytes -> 04 00 BB 80 20 (as is in the hex editor)
The header gives out the compressed size (big endian) minus the 4 fields that go before this (4th field in the pic). And right after it I guess it is the uncompressed size (5th field) because the number is always almost twice the size, to be exact, it's like 1.8 times bigger than the size it occupies in the file. It appears twice though after the 5 "signature" bytes.
Then it's all audio data. I guess the sampling rate is given either at the small section at the start of the file when it lists all the audio samples present in the tmx or it is as well given right here48000hz
There is an odd byte though (byte with a value of 20)
Not much stuff to find here

Image

EDIT: lmao the codec is the same as in NFScarbon ABK minus a few bytes, it's the same structure actually after the 04 00 bytes, I can extract them now with NFS carbon abk decoder, cant encode them back though. So ignore the above, a decoder already exists.
  • Author
  • Localization

Moussa Bayou, posted Sat Aug 05, 2017 5:11 pm (25257)


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

V12-POWER, posted Thu Jan 24, 2019 2:13 am (42704)


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

id-daemon, posted Fri Jan 25, 2019 4:03 pm (42745)


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

V12-POWER, posted Sun Jan 27, 2019 1:14 am (42810)


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
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.