Author Topic: [PC] Import/export sounds - FF8Audio (1.1)  (Read 9571 times)

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
[PC] Import/export sounds - FF8Audio (1.1)
« on: 2014-01-19 20:08:42 »
DOWNLOAD

What is FF8Audio?
FF8Audio is an upgrade of Qhimm's FF8SND. In addition to everything FF8SND offers, FF8Audio also lets you add and/or replace sounds to the sound database, lets you add descriptions to each sound, shows you the Field ID for each sound effect (which is different from the FF8SND IDs), has an "export all sounds" button, and can write all the sound data back into the database files.

How do I use FF8Audio?
Extract FF8Audio.jar and FF8Audio.bat (the Descriptions file is optional but you should use it) to the same folder which audio.dat and audio.fmt are located (usually within "Final Fantasy VIII/Data/Sound/" ) and run the bat file. ALWAYS BACKUP YOUR FILES!! I AM NOT RESPONSIBLE IF YOUR FILES BECOME CORRUPT! The buttons should be self-explanatory, but just in case. . .
  • Load FMT loads all the sound data from the aforementioned files.
  • Save FMT writes all the sound data you've loaded/messed with back into those files.
  • Play Sound plays the currently selected sound.
  • Extract Sound saves the currently selected sound to the "/export" folder this program creates (in the same location).
  • Extract All saves all valid sounds to the "/export" folder, named by their Field ID.
  • Mass Import imports every sound contained in the /import folder. The file name of each sound file will be its Field ID (for example, to replace the "escape from battle" sound (Field ID 7871), place a sound file named "7871.wav" in the /import folder)
  • Replace Sound replaces whichever sound you're selecting with a sound file from your computer (a file chooser dialog will pop up)
  • Add Sound adds a new sound file of your choice to the end of the list.
FF8 supports only one type of sound format: Microsoft 4-bit ADPCM WAV. No program I know of can make these anymore, but luckily, Audacity gets close enough that my program can import a file made by Audacity and do a little housecleaning on it to make it work. To prep a sound file in Audacity, do the following:
  • Make sure your Audacity project is 1 channel, 16 bit PCM
  • Export the sound with the following options: "Other uncompressed formats -> WAV Microsoft -> Microsoft ADPCM"
  • You can then import it with FF8Audio. To make sure it imported correctly, extract the sound back from FF8Audio and open it in whatever media player you use, because the "play sound" button sometimes doesn't work (see below).

What can I do with this?
FF8Audio only lets you modify the sound archives. It doesn't have any functions that let you actually change anything in the game (of course, replacing existing sounds will affect the game). Beyond switching sound effects for better (or different) sound effects, you'll need to have some knowledge of the field files and the script language to make big changes to FF8. With that kind of knowledge, you might be able to do something as spectacular as this.

I guess I should mention that this only lets you change sound effects. This program can't change the game's music.

Are there any bugs
You betcha!
The only known bug is that the "Play Sound" preview doesn't always load the sound properly. This is because Java doesn't really like playing 20-year-old sound formats. The sound files themselves are fine. If there's a sound that doesn't play properly (or doesn't play at all), just export it and open it with your favorite media player to hear it correctly.

The highest field sound ID that FF8 will load is 19999. This program has no way around this limitation. The IDs start at 7850 and FF8 only comes with 2700 of them (the highest ID that comes with the game is 10640), meaning you can add 9359 new sound effects that will work.

My voiceover project will eat up most of that space, I will edit this when I know exactly how many sounds it uses. If you plan on making a mod with new sound effects (as opposed to updated/replaced sounds) that's compatible with the voiceover project, you will have to avoid the IDs that I use.

Special Thanks
I of course have to thank Qhimm for figuring out the file formats for the audio files and for releasing his FF8SND source code, which I used to get started on this project. I'd also like to thank the rest of you for releasing all these cool mods I love using.
« Last Edit: 2018-04-24 17:16:41 by Covarr »

Kaldarasha

  • No life
  • *
  • Posts: 2223
  • Karma: 133
  • Prince of Model Editing
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #1 on: 2014-05-21 19:14:56 »
Can this tool expanded for FF7? It use the same archives for the sound, but in the dat have wav files and not snd. Currently is there only one working tool (cosmo)  and this isn't that good. It adds sound files in the audio.dat and link the audio.fmt list to the new file, so it is a fake replacement. But I need a tool which replace the sound in dat and leave the fmt as it is.

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #2 on: 2014-05-22 04:02:15 »
[cosmo] adds sound files in the audio.dat and link the audio.fmt list to the new file, so it is a fake replacement. But I need a tool which replace the sound in dat and leave the fmt as it is.
I don't understand (maybe it's a translation problem, your post was a little confusing).

The game needs the FMT file to load sounds. If you only change the dat, the game will never be able to find your sound.

I haven't tried it myself, but if you put this tool in the same folder as the audio.fmt and audio.dat ( FF7/data/sound/ ), it should work. The only difference would be that it still shows the FF8 Field ID for each sound, which would be much larger than it should, as FF7 has a smaller library of sounds.

You just reminded me to upload the version with the bugfix, though.
« Last Edit: 2014-05-22 04:05:46 by Shard »

Kaldarasha

  • No life
  • *
  • Posts: 2223
  • Karma: 133
  • Prince of Model Editing
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #3 on: 2014-05-22 04:33:46 »
Sorry for my English.
No it doesn't work with the FF7 audio.dat and audio.fmt. It is placed correctly but if I click on load FMT nothing happens.


I knew that the FMT is more or less the link to find the sound data. But I want replace a sound and not add one, but I fear that the FMT has also information about size and length of a sound data, which makes it necessary to update it as well.

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #4 on: 2014-05-22 04:48:54 »
My program updates the FMT correctly, even if you replace an existing sound.

Run the .bat file that comes with the program (instead of the jar) and it should be able to open the FMT (I uploaded the new version just minutes ago, you should download it again from the link). If it still doesn't work, it means there's something different about FF7's FMT file. I don't have FF7 installed on this PC to test it.

Kaldarasha

  • No life
  • *
  • Posts: 2223
  • Karma: 133
  • Prince of Model Editing
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #5 on: 2014-05-22 05:36:20 »
This is what I get when using the bat file and then clicking on load FMT.


If you don't mind I could send you the files. It's not urgent but your program looks very neat and I would like to use it for 7 too.

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #6 on: 2014-05-22 06:39:49 »
I have the files on my laptop. The line that threw the error has to do with loading the sound file itself from the dat, which means one of the audio files (or both) are slightly different than FF8's files.

When I have some time, I'll try to make it compatible with FF7.

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [1.0] FF8Audio, Successor to FF8SND
« Reply #7 on: 2014-06-03 18:44:05 »
I've been reading that FF7 only has a 750 sound effect limit. Is there a reason for this?

And if I may ask, what's so difficult about Cosmo? (I've never used it, so I don't know).

One last thing: What's the Sound ID base in FF7? In FF8 it's 7850. I'd assume it's much lower in FF7.
« Last Edit: 2014-06-03 19:26:09 by Shard »

Seraphim87

  • Fast newbie
  • *
  • Posts: 46
  • Karma: 2
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #8 on: 2014-09-07 23:58:59 »
http://forums.qhimm.com/index.php?topic=15527.0

Hey Mr. Shard and co.  I'm not entirely certain if the board permits private messaging but, in any case, just wanted to submit this to your attention.  If you or anyone else is interested in doing improvements to FF8's SFX then please feel free to come by this topic, thanks! :)

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #9 on: 2014-09-08 00:09:30 »
You probably didn't notice that I already posted in your thread and linked you here (along with someone else) :P

kaspar01

  • Crazy poster
  • *
  • Posts: 103
  • Karma: 14
  • FFVIII Fan & Collector , 3D Artist , FF8RP-WIP
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #10 on: 2015-08-20 18:29:08 »
I hope this will not be considered necro-posting but I noticed this tool only now and I'm really interested in it and it's improvement.

I'm tryng it right now since I'd really like to catalog every FF8 sfx (I already started that job some time ago but stopped then.. I want start again sooner :)

Update:

Ok I tested it and it's very useful and the size column is useful but I wonder if you can add an offset column too (that would be EXTREMELY USEFUL for my research)

..or share the source code :)



« Last Edit: 2015-08-20 18:31:21 by kaspar01 »

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 504
  • Karma: 89
  • Paranoid
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #11 on: 2015-08-20 18:35:08 »
If you're running out of time, then could you send me the source so I can add the offset list code. Thanks!


UPDATE:
This is where Engine pushes ECX register on stack, which (ECX) holds audio.dat sound offset to be read:
Code: [Select]
FF8.exe+69DD8 - push ecxSoon after a CALL is given to READ file:
Code: [Select]
FF8.exe+69DDB - call FF8.exe+6E780
And here's the play sound function:
Code: [Select]
FF8.exe+69E26 - E8 B5450000           - call FF8.exe+6E3E0NOPing this will mute sound.

Stream opens audio.dat and reads byte array with given offset and length.

With this I need to find when length is stored and if it does have some ID. We need this for MAG files to find out when it calls for sound.
« Last Edit: 2015-08-20 21:30:22 by MaKiPL »

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #12 on: 2015-08-20 22:05:32 »
Ok I tested it and it's very useful and the size column is useful but I wonder if you can add an offset column too
The offsets to what? The offsets to the sound in the dat are unpredictable unless you know the structure of your dat file. My program actually rebuilds the dat, removing any unused and/or blank data, so the offsets will change every time a sound is added, changed, or removed.

The offsets in the fmt file are also unpredictable, since blank entries take up (35?) bytes, while usable entries take up 70 bytes. Inserting and/or removing sounds changes the offsets of every entry after it.

Can you be a little more descriptive about what offsets you need and what you need the offsets for?

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 504
  • Karma: 89
  • Paranoid
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #13 on: 2015-08-20 22:12:03 »
He meant the second 4 byte in FMT archive.
0x00 = file size
0x04 = offset

I know the file is dynamic.

Here's the EDI register, that holds sound ID:
Code: [Select]
FF8.exe+69D88 - lea edi,[edi+edi*2]
Offsets are hardcoded inside .data in FF8.exe

kaspar01

  • Crazy poster
  • *
  • Posts: 103
  • Karma: 14
  • FFVIII Fan & Collector , 3D Artist , FF8RP-WIP
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #14 on: 2015-08-21 13:45:28 »
The offsets to what? The offsets to the sound in the dat are unpredictable unless you know the structure of your dat file. My program actually rebuilds the dat, removing any unused and/or blank data, so the offsets will change every time a sound is added, changed, or removed.

The offsets in the fmt file are also unpredictable, since blank entries take up (35?) bytes, while usable entries take up 70 bytes. Inserting and/or removing sounds changes the offsets of every entry after it.

Can you be a little more descriptive about what offsets you need and what you need the offsets for?

Don't worry I solved it myself :)

Yagami Light

  • Cool newbie
  • *
  • Posts: 56
  • Karma: 13
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #15 on: 2015-08-28 10:11:17 »
I like this tool shard but some sounds wasn't loading so I dl'ed all the sounds off youtube. I actually started adding to the description list ages ago but never got around to posting it, so here is the updated sound list I made.

https://www.dropbox.com/s/ws7943pp1r3vwnk/Descriptions.txt?dl=0

FF7Cloud_Strife

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #16 on: 2016-06-06 21:43:30 »
I need help on executing the Batch file. I know that I followed your process correctly and all, but it keeps telling me that "java is not recognized as an internal or external command, operable program, or a batch file." I've been doing everything I can to get it to work, but it always ends up with a result of frustration and a loss of self confidence. I've also searched everywhere to see if anyone else had the same problem, but apparently I'm the only one. I need your help and guidance as soon as possible.

Game: Final Fantasy 8
Version: Steam

P.S. I would post an image of what happened, but I don't know how.

Shard

  • Insane poster
  • *
  • Posts: 334
  • Karma: 34
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #17 on: 2016-06-06 21:49:16 »
You need to download and install java on your machine.

FF7Cloud_Strife

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #18 on: 2016-06-10 16:57:51 »
Hmm...ok. I'll download it and install it. If I have any further complications, I will notify you. Thanks, mate! :D

FF7Cloud_Strife

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #19 on: 2016-06-10 17:15:57 »
Ok, I downloaded it and installed and it worked! Thank you so much for your help!

Tsunamix

  • Freak
  • *
  • Posts: 718
  • Karma: 14
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: [FF8] Import/export sounds - FF8Audio (1.1)
« Reply #20 on: 2018-04-04 00:02:19 »
Sorry to Necro this but do you have a updated list for these ID's? I'm trying to work out how your attaching sounds to text boxes