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

Codecs, formats, encoding/decoding of game audio, video and music
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

Take your time. :)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Here is what I found:

1. ABK insert is working right. Don't worry about abk growing is size, it must be that way, because i'm not replacing sounds, i'm appending them to the end, so not to break the file structure.

2. ABK sounds are all pitched according to GIN table. Even the idle & overrev sounds.

I don't know how it is done. It may be very complex. All I know as of now, is that it seems it depends NOT on the number of GIN elements, but on their length (in milliseconds or something).

For example, if you have 4 seconds GIN with 100 elements, and 8 seconds GIN with 200 elements, ABK will sound about the same with them.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

Thanks for your research.

If we know this data you've found, it may not be difficult to create sounds regardless of the data we don't know. It's still useful and worth testing. :)

The Carbon GIN files are much longer and richer in sound. In fact, if you're in it for the research, Carbon may be more interesting... :) The game does quite a bit of mixing and matching between different samples to create sounds, and the result is great compared to MW. I can recognize which samples are being mixed, but some got me fooled because I didn't know the source.

One thing I desperately need to know... Is there anything related to the name of the file in the GIN? The tools we have right know don't allow editing of the names in the database. I can think of two alternatives, either the identity is in the GIN itself or the EXE. If it's the latter, we're out of luck. But I really wanted to change the names of the GIN files because it sucks to have a Ferrari V12 sound named "Cavalier". :P
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

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

Post by V12-POWER »

It might be a great idea to try and research the assembly code in the abks...that is the only thing we did not touch yet and maybe the key to this whole pitch/lenght/elements/gin mistery.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

V12-POWER wrote:It might be a great idea to try and research the assembly code in the abks...that is the only thing we did not touch yet and maybe the key to this whole pitch/lenght/elements/gin mistery.


I agree.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Zpectre87 wrote:One thing I desperately need to know... Is there anything related to the name of the file in the GIN?


Absolutely no. GIN only has 2 tables, 2 RPM values and audio sample.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

V12-POWER wrote:It might be a great idea to try and research the assembly code in the abks...


I don't think so. I believe it would be easier to write a new game of your own.

Now you have all the data you need to mod ABK/GIN files. If you keep number of elements close to the scheme I described before, you can get very good results. But if you want it perfect, you need to adjust each element manually. I can make a tool for you to do this, but I doubt anyone will ever use it.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

Worked perfect. Thanks!

Only issue is that, since MW sound engine is different from Carbon, it's quite difficult to make it sound the same.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

Hmmm, the only thing is that the high number of elements in my sample is drastically increasing the pitch of the rev limiter sound. You can circumvent that but the odd thing is that, using a number of elements equal to [number of samples]/[number of samples in each element], the rev limiter works alright.

The sounds from Carbon can be mostly straight converted. But Carbon is a weird game, for example I'm converting DB9 and the car has both engine and exhaust GIN files for acceleration but no engine GIN file for deceleration. I suspect it's because Carbon mixes and matches sounds at will. You can notice when you upgrade DB9, it still uses DB9 sample but it's mixed with Mercedes SL65 sample. This could be done manually in MW but it depends on the ABK file because each ABK redlines at different rpm.

Ideally you'll want to mix every sound of the same class, but DB9 sounds pretty accurate without the engine ABKs, although not the same as Carbon. I need to find out what exactly they did in Carbon to make the sound richer, and I believe it's got higher bass from the exhaust samples.

EDIT: To make the sound EXACTLY the same as in Carbon, the samples aren't enough, you need to edit the database as well, at the very least the min and max rpm and engine type.

You also need to be aware that Carbon happily mixes engine of one car with exhaust of another. I can detect most of these by ear, but not all. Murciélago for example I'm pretty sure it uses the 91 ID for engine (Zonda), but Diablo exhaust in stock and Murciélago sound in upgrade. The database doesn't tell you any of this, not that I found at least.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

Small question: what's the difference between EE and SPU ABKs? I have no idea... Though SPU files don't seem very important.

I've tested, and tested, and tested... I don't see an easy way of reproducing Carbon sounds in MW because there's a node in the database called "caraudio" which tells the game which sample sets to use per collection. It mixes different GIN and ABK files with each other, but the GIN files have different length and they're accelerating/decelerating sounds so bending them to make them equal will take a lot of work.

I also believe it's possible to use samples with higher frequency (32kHz), as the originals are 32kHz, but it depends on the game's memory allocation.

In MW to me it's clear - GIN is the exhaust and ABK is the engine. Carbon, however, has GIN and ABK files for both.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Zpectre87 wrote:You also need to be aware that Carbon happily mixes engine of one car with exhaust of another. I can detect most of these by ear, but not all.


You can detect that with a program that can show you which files the game loads on starting the free roam. I used that :)
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Zpectre87 wrote:Small question: what's the difference between EE and SPU ABKs?


Looking at the structure there seem to be no difference. I remember we looked into that with V12-POWER, but don't remember the result. Maybe just some changes in code/data values. Samples were the same as I remember.
Zpectre87
Posts: 35
Joined: Sun Feb 07, 2016 10:48 pm

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

Post by Zpectre87 »

id-daemon2 wrote:Looking at the structure there seem to be no difference. I remember we looked into that with V12-POWER, but don't remember the result. Maybe just some changes in code/data values. Samples were the same as I remember.


Not all of them. A few are slightly different, from other cars, too. And some banks have less samples.
RedCarDriver
Posts: 1
Joined: Fri Sep 30, 2016 11:38 pm

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

Post by RedCarDriver »

Zpectre87 wrote:The sounds from Carbon can be mostly straight converted. But Carbon is a weird game, for example I'm converting DB9 and the car has both engine and exhaust GIN files for acceleration but no engine GIN file for deceleration. I suspect it's because Carbon mixes and matches sounds at will. You can notice when you upgrade DB9, it still uses DB9 sample but it's mixed with Mercedes SL65 sample. This could be done manually in MW but it depends on the ABK file because each ABK redlines at different rpm.

Ideally you'll want to mix every sound of the same class, but DB9 sounds pretty accurate without the engine ABKs, although not the same as Carbon. I need to find out what exactly they did in Carbon to make the sound richer, and I believe it's got higher bass from the exhaust samples.

EDIT: To make the sound EXACTLY the same as in Carbon, the samples aren't enough, you need to edit the database as well, at the very least the min and max rpm and engine type.

You also need to be aware that Carbon happily mixes engine of one car with exhaust of another. I can detect most of these by ear, but not all. Murciélago for example I'm pretty sure it uses the 91 ID for engine (Zonda), but Diablo exhaust in stock and Murciélago sound in upgrade. The database doesn't tell you any of this, not that I found at least.

If you get any version of nfsu360's VltEd that's capable of editing Carbon's database, you should find that there is a "caraudio" set of database keys that has separate intake and exhaust components.

In other news... is there anything in particular I can do to open ProStreet's audio files? I'm not terribly technically inclined, but could probably figure out slight hex editing if necessary.

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?
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

RedCarDriver wrote:Additionally - is there any obvious procedure for getting looping extracted copies of the samples in the .gin files


GIN samples are looped in game from any point to any point inside of it. For example, GIN has 1000 points. When you drive, it loops sound from point 100 to point 200. Then, since you accelerate, next fraction of a second it will loop from point 101 to point 202. And so on.
brunocardoso
Posts: 1
Joined: Sat Oct 15, 2016 1:04 pm

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

Post by brunocardoso »

Hello, it's been a while since I've been trying to edit files abk. In my case I'm trying to edit the fifa 07, 08, 09 and 10.
I can't extract the files with their tools, but I am not able to modify the files because the file modified is mute in the game.
I'm using wav files, 22050hz, 16 bit, mono. I tried also using some different formats, some is also dumb and others do close the game.
I've tried including importing the same file that was extracted and yet is mute in the game.
What can it be?
KingOfGuns
Posts: 2
Joined: Sun Nov 20, 2016 12:06 am

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

Post by KingOfGuns »

Hey id-daemon, is there any chance you could make a ABK_insert for carbon? i need it for a mod i'm making.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

Chances are small. Maybe next year?
V12-POWER
Posts: 71
Joined: Thu Jul 02, 2015 10:43 pm

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

Post by V12-POWER »

id-daemon wrote:I recently checked some of the later NFS games (HP 2010 & Rivals) for engine sounds and found that all of them use the same GIN format, and its decoded by my tool. Seems this is unique format for smoothed audio curves and they never changed it through the years.

As for other engine sounds previously stored in ABK files, newer games use modern EA formats that they use in all their games now, including Dead Space 3, Dragon Age Inquisition, StarWars Battlefront, e.t.c. and I'm more familiar with them, I was able to decode/encode such formats already a year ago.

Do you still like to proceed with MW 2005 or maybe we choose another game?


sup, it's been a long time

quoted this to ask you the following
Maybe I misunderstood, but the audio .chunk that you dump from frostbite 2015 files, specifically from NFS2015, are, in essence, .gin files with the .chunk extension OR the .chunk is a compressed .gin file.

I ask you this because well, the guys from venice unleashed did some great progress with their tool. However, in the case that it is possible to encode the files back, there is a more complex system involving the .ebx and stuff, it's a step forwards, though

-------------

anyways, im on holidays now like last year. This time I see a spark of interest in older NFS again since another modder released a new tool for EAGL-based NFS games in september. So if you're busy with something else, I'll wait. If you need any help, im here.
id-daemon
Posts: 1040
Joined: Sun Mar 22, 2015 7:09 pm

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

Post by id-daemon »

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

And yes, now I'm busy with completely different things.