Gran Turismo 2 Sound Modding

Discussion in 'Hybriding' started by submaniac93, Jan 31, 2017.

  1. submaniac93

    submaniac93

    Messages:
    1,042
    Location:
    France
    My gawd is this frustrating. Okay so I went through all of the engine folder, turbo0 and turbo3 in search of sounds I could recognize. Here are my findings:
    THEY ALL SOUND THE SAME (or very nearly) the reason being that it seems PD decided to slow down the sound sample a lot and speed them up in the game's programming or something.

    I managed to find the Mazda 787B's sound, but it's nearly unrecognizable. I had to speed the sample up by 2.5X to get it to sound as it would at 8k rpm. If every single sound on GT6 is that way finding anything will be a massive hassle.
    Anyhow, I found 2 leftovers that may or may not be used:
    22401 TVR Speed 12 (which is basically exactly like it was on GT2-3, down to sample pitch)
    23001 which uses what used to be the Toyota GT-One samples, as for if they're used or not on GT6... I can't tell. I know the GT-One and every car that had a similar sound to it (BMW V12 LMR, Jaguar XJ220/XJR9 and a few) have had their sound altered since GT5.

    So yeah. Identifying the cars associated with sound will be a pain. Apart from that, I'd say we have a fairly good chance to be able to port some over to older games, with a few tweaks here and there. Me and Xenn will eventually look into this. But do't expect anything soon-ish. It's going to be complicated.
     
    Michelin Man likes this.
  2. TTannenbaum

    TTannenbaum

    Messages:
    7
    Location:
    Japan
  3. submaniac93

    submaniac93

    Messages:
    1,042
    Location:
    France
    Not really, what you're looking at is the actual .wav sounds inside the sound file.
    Under ENGN are offsets for each sounds (10 43, 60 61, A0 79, 00 91, E0 AF, 50 CA, C0 F0) to the left of those are the corresponding sound's pitch setting, as well as crossfade settings, sound frequency and a few other things maybe (I'm saying all of this from memory, @Xenn is the one that knows about these things, he only explained to me). And I think the actual sound data starts at 0xD0 or 0xE0.
    If you want to get the sounds out from this file, you have to use PSound which is pretty magical.
     
    B_rad88! likes this.
  4. Xenn

    Xenn Premium

    Messages:
    2,226
    Location:
    United Kingdom
    I mostly cracked the sound format a few days ago. GT1, GT2 and GT3 can use the exact same files from one another, and it'd work 100%. Might have to do some renaming first though.

    Here's what I managed to find out.

    Starting Variables
    0x000: ENGN Header: 4 character string
    0x004: Start of File Offset: 4 byte
    0x008: Needs to match the value at 0x014: 4 byte
    0x00C: Sample Offset Reduction: Signed 4 byte
    0x010: File Size: 4 byte
    0x014: End of Sample Variables Offset: 4 byte
    0x018: Number of Samples to Use: 4 byte
    0x01C: Offset to first Sample Variables: 4 byte
    0x020: ??? (Crashes if 81FF or higher): 4 byte
    0x024: ???: 4 byte
    0x028: ???: 4 byte
    0x02C: ???: 4 byte

    Sample Variables
    In this file, the first sample variables starts at address 0x030

    0x030: Sample Fade-In Ending RPM
    0x032: Sample Fade-In Starting RPM
    0x034: Related to RPM (0 for idle rpm samples, usually the same as the last two)
    0x036: Sample Volume
    0x038: Sample Pitch/Frequency (Can get correct frequency for PSound, by converting this to decimal, then adding 0 at the end.)
    0x03C: Sample Offset

    Each Sample Variable set is 0x010 bytes long, so sample 2 will start at 0x040, for example.

    To calculate the correct Sample Offset, take the value at 0x008, and add 0x020 to it. In this case, this will result in E0. This is your value to finding out the offsets.

    0x03C says 0000, so if we add E0 to that, we get...well, E0. If we then go to E0, the start of the sample will be right there.

    File size will need to be the current file size in hex, deducted by the value at 0x008.

    Sample Offset Reduction will basically add or deduct the specified number from the offsets, when loaded into RAM.

    In a nutshell, these sound files are a batch of .VAG sound files bundled into one. PD created a custom sound file so these can be played when needed to.

    Oh, and should also point out. GT4 won't be extracted correctly if you use GT3 tools, the conversion creates a scrambled mess. You can find the ENGN headers inside the GT4.VOL file, with your hex editors search function.
     
    Last edited: Dec 17, 2017
  5. TTannenbaum

    TTannenbaum

    Messages:
    7
    Location:
    Japan
    I started Topic related to GT1 Sound Modding on xentax.
    Perhaps, you can port GT1-GTC 2002 sound bank to each other if someone establish the way to do this.

    http://forum.xentax.com/viewtopic.php?f=10&t=17464

    P.S. I tried to edit sample variables to fix pitch mismatch. But nothing happen or unexpected corruption happens.
     
    Last edited: Dec 28, 2017
  6. submaniac93

    submaniac93

    Messages:
    1,042
    Location:
    France
    Ah you want to repack GT1.... trust me, I also want that. Although, first i'd like for the unpacker to unpack acual files, because I doubt the whole game's made of .DAT ... but yeah. Also keep in mind the files are written in little endian, maybe that's why your files didn't work.
     
  7. TTannenbaum

    TTannenbaum

    Messages:
    7
    Location:
    Japan
    I'm saying about GT1 sound modding issue.
    I found the construction of SOUND.DAT and I'll introduce its features I know.

    1.Data Assignment
    Data with INST or ENGN header starts on adresses there is only 000 or 800 after 3 letters in hex as far as I know.

    2.The Construction
    1. ? (0x0 - 0xFF0) : It may decide the assignment of 3 INST header data and 245 ENGN header data.
    2. 3 INST Header data
    3. 245 ENGN Header data

    I tried to replace Unused Viper RT/10 sounds to GT2 ufo sound in hex editor because of reduction of size, but this caused GT1 broken. (it'll be frozen!)
    now, I think 0x0 - 0xFF0 section is the key to solve this problem and it'll be the hint of DATrepacker development.

    2 SOUND.DAT are here:
    NTSC-J : https://mega.nz/#!sVEikQoS!3Jl07MWWm-bFGDtRy7mOW3j4ryNe2oQTwGWtCmoI109c
    NTSC-U/PAL : https://mega.nz/#!VdMWmSAL!UXWJA16Uvqmc2fDa-A3w4fPozduhVCTcS567VSxImfw
     

    Attached Files:

  8. TTannenbaum

    TTannenbaum

    Messages:
    7
    Location:
    Japan
    P.S.


    Test Drive
     
    submaniac93 likes this.
  9. Alex Carriel

    Alex Carriel

    Messages:
    35
    Location:
    Brazil
    I know this is about GT2, but the engine sounds can be modded on GT4? Could the Formula GT sound of the GT PSP be ported to GT4?
     
    Last edited: Apr 4, 2019
  10. submaniac93

    submaniac93

    Messages:
    1,042
    Location:
    France
    As long as we have a way of unpacking, and re-packing the .VOL files for both games (which we don't) then in theory it should be trivial yes. In theory, sicne the sound format for GT games didn't change much, all games from GT1 to GT6 could have interchangeable sounds (with minor edits for the PS3 titles to adapt to the new format)
     
    Alex Carriel likes this.