Author Topic: AKAO converter for sound effects - FFIX  (Read 16976 times)

Fraggoso

  • *
  • Posts: 278
    • View Profile
AKAO converter for sound effects - FFIX
« on: 2017-06-19 14:41:05 »
I'm trying to deepdive into the FFIX sound system (only the soundeffects not the music) as it could be rather easy to then switch out the sound effects from the Steamversion by custom made ones or the original from PSX. They're stored as AKAO on the images in the PSX Version and are stored as akb.bytes in Steam.

Maybe someone out there is smart enough or has more insight then me on AKAO files (and yeah start laughing as mine is almost at 0 ^^).
I want to know if there's a possible solution for converting AKAO files into finished wav/mp3/ogg.
There's a sequencer for the music but not for the soundeffects and I GUESS that everything is packed directly in the AKAO file itself rather than using an external sequencer from the PSX itself.

I could open them with this little tool: https://github.com/vgmtrans/vgmtrans/releases and see that there're two samples stored in the file and I was also able to convert the two samples into wav's samples. And it also displays information like Sample Offset, Loop Point etc...
What is missing, when I convert the samples, obviously are all the information around this two samples. What sample is played when and what effect needs to be applied.

Here's an example from the PSX Version: https://www.dropbox.com/s/ouy4h5xjl9gut58/0.zip?dl=0
The file contains two files and a folder.
The 0 is the AKAO File and the akb.bytes is the steam version (just drag and drop into VLC, it plays without problems).
The Folder contains the two samples that I've extracted from the AKAO file.

On the music part I tried using a psf psf file from the battle, and it could also be loaded by vgmtrans. It had the same 36  samples in it and with the help of tirlititi we could match that to the specific index/music from the steam version. So, in theory, there would be no guessing what will go into what file (as of now). The psf also contained the whole sequence.

I HOPE (!!) there's maybe a way to extract the whole sound effect in a finished state somehow from the AKAO files.
The Thread could also go into tools, but as I ask specifically around the AKAO file I'm good with either subforums. =)

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #1 on: 2017-06-19 20:00:10 »
DLPB had explained how AKAO does working on the PSX. From what I remember it isn't only a sound file but also has it instructions how the effect should sound (pitch, speed, etc). That's why Dan has recorded all sounds from the PSX game (don't know which tool he used)and re-implement them with his sound replacer with a lot of manual work.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #2 on: 2017-06-19 20:06:47 »
For ff7 PC I had to recreate the entire system and send the game functions to my own functions that use bass.dll.  I recorded all SFX from PSX version using Mednafen.  PC versions of FF games will use streamed data like wav, ogg.  PSX, as Kal says, uses a custom made script that makes use of a set of custom adpcm instruments.

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #3 on: 2017-06-19 21:23:21 »
Thank you both.
@DLPB Do you think this would work for FFIX as well?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #4 on: 2017-06-19 21:47:37 »
Replacing the FFIX audio would likely be along the exact same lines as what I've done for FF7 - with the exception that I hear FFIX can be built using the original source?  Which would make things easier,  no?

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #5 on: 2017-06-19 21:50:19 »
As of now I would only test if it's that easy, yes.
I just need someone to teach me how I can get the akao files into their respective listening formats. I'm by no means a sound expert though. Is it hard to use mednafen?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #6 on: 2017-06-19 21:51:57 »
It's an emulator.  You'll need a way to play all the sound effects on the PSX version using that emulator and record them all manually. I had the luxury of being able to use Makou Reactor to edit field script and add my own sound test.  I have no idea how you'd do it.

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #7 on: 2017-06-19 22:23:56 »
That's the thing. If I do that I could just download the sound effects.
Sadly I need a way to work with the akao files directly as they have the index I need to link them to the steam sounds.
There's really no way to extract the sfx from them entirely with all effects?

I don't want to go the way dclem approached his sound mod as he had to listen to 3k files of sound. :/
If that's not possible than I'll give up as I sadly don't have the time for it. :/

It would they show up in sound test... I've to speak to tirlititi. :)

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #8 on: 2017-06-19 23:33:34 »
I guess Hadeswork shop could do the same as Makoureactor. There is a guy who had already ripped the sounds from the PSX ones, (https://thelifestream.net/forums/showthread.php?s=897601acd9794265b16b0904e89c03be&t=16647&page=2) the name is Vivi_Carol, but you know him better as dclemDie Welt ist halt'n Dorf, ne? ;D

Maybe that does work: http://www.theisozone.com/downloads/playstation/tools/psound-psxps2-sound-rip-tool/  :-\
« Last Edit: 2017-06-19 23:35:07 by Kaldarasha »

dclem

  • *
  • Posts: 173
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #9 on: 2017-06-19 23:38:24 »
I was just updating that thread, too.
You're on there too?

I use both Memoria and HW to fix the sounds here.
Memoria was first to have importable sounds compatibility (more stable still)
HW came second - and is more user friendly!
But both work great together.
>>What's this about 'download'??
I've already ripped all the sounds FFIX psx, I told you that already.

Quote
ripped. just like 12 and 4.
yet the ids before were inadequate.
missing "vrrrm" sound for reflected magic; spell animations id are linked to the sound ids missing.
same with chocobo's "crunchy" beak on forest grass sfx and choco's 'kweh!' when used Gysahl Green on the world map to call him.
the ids in steam are torn up; as they have a bunch of unused sounds stuffed in there as well, which makes it harder to identify which is actually used legitimately in game; starting with all the weapons sfxs.
They include some swings with some slashes. played alternatively; versus psx where it's a single playback one swing for miss, one slash for hit.
ID-72930 for Steiner's sword slash~psx if I remember right.
And for some longer spell animation like "Holy" the script forces a Sound Res pitch here because of the slower battle FPS happening when this spell is played; it's slower than the psx.
Spells just like Holy are:
All Quina's blue magic (dunny why, but it is)
Freya's jump+ jump spear:
[Trance-Start] and [Trance-End] these ones also had an extra sound for [Trance-End] need to be removed when replace with psx, or the [Trance-Start] sfx will play twice on the [Trance-End].
All the summons and Amarant's Chakra.
For these hefty amount of sfxs, I thought maybe game engine was pitching; but it seems like the script was instead; there was a file in resources.assets that handled some of those, I forgot the name; I'll see when i get back to the library.
These will ignore the Sdlib.dll sampling rate regardless.
It would be easier if a list of ids to go off of, but it's more having a good listening ear; and audio program to identify Silicon's garbled up sfxs embedded in FFIX PC.
It is ridiculous.

And it's not just needing to listen to sounds; (you couldn't do that anyways) more like: placement of 3 or more for sounds linked with same ID to reveal the sfx played in game.
ex:
Sound IDs: 2000180.akb.bytes
Sound IDs: 2000181.akb.bytes
Sound IDs: 2000182.akb.bytes
Sound IDs: 2000183.akb.bytes
Sound IDs: 2000184.akb.bytes
Sound IDs: 2000185.akb.bytes
Sound IDs: 2000186.akb.bytes
Sound IDs: 2000187.akb.bytes
Sound IDs: 2000188.akb.bytes
These are linked.

break;
Sound IDs start with: 2000190.akb.bytes and so on.


All of these make up the sfx: "Flare".

in PSX:

Sound ID: 430354 is "Flare".

Those IDs PSX weren't matching with steam's akb IDs.
To get the some of these specific sfxs like "Flare" and some Airship sfxs/ and the trolley car of the PSX sounds to play correctly in game, you must separate it the same way it is originally.
I didn't think I'd have to do that! But not doing that only made it play off key.
Luckily not all sounds are like this, but a lot are, and it's ridiculous, I know. It makes no sense it's done this way, but this is what Silicon did when they recreated their botched sounds. So their sounds would play right.

Now, the PSX did random pitching itself too with some sounds starting with footsteps.
Had a series:
Sound IDs: 2713 "Concrete" footsteps 1 pitch 1
Sound IDs: 2715 "Concrete" footsteps 1 pitch 2
Sound IDs: 2724 "Concrete" footsteps normal
Sound IDs: 2737 "Concrete" footsteps 1 pitch 3
But it isn't botched.
*With the sound mod, there are two of them, the one with custom ones and one for vanilla version (without custom sfxs). That will come after I finish my first one.
« Last Edit: 2017-06-19 23:58:26 by dclem »

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #10 on: 2017-06-20 09:49:56 »
Like I said, I'm trying a different approach so we know exactly what ID from the PSX is the counterpart in Steam.
@Kaldarasha The tool can't be used to play the AKAO files. It scans the disc and finds butched sound effects. At least they don't sound that great *lol*

@Dclem Thanks for the information (and also the notch that I couldn't listen to sounds anyway...) I guess?

@DLPB Did you used the debug room for it or did you program your own sound test for it?
If yes, did you knew exactly what AKAO file was playing so you knew what sound effect in the steam version needs to be replaced or is the data structure and filename identical between the two?

dclem

  • *
  • Posts: 173
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #11 on: 2017-06-20 12:50:35 »
There is no counterpart, these are two different systems; you seen it above. These IDs don't counterpart to the ones in steam~mostly because they aren't from the PSX; they're all new samples made to "sound" like PSX made by Silicon, which they did a lousy job obviously in the process. That's what it is.

*You can't listen to one sfx in the steam version and even comprehend what it is, and what it's used for, unless you place all of corresponding sfxs together that are linked.
Sadly, there isn't a user friendly table that that shows which spells + environmental etc. sfxs is linked with which ID and when it's played. Just a bunch of numbers found out the hard way. And a long way; the only way I figured it out in the end.
I had to create my own table to identify and keep track of which sfxs is which in the steam version. And there is a lot of unused sounds; I dunno why Silicon Studios had so many unused sounds, some of them appear to be repeats of some environmental and spell sfxs they were gonna use in the final release, but didn't; then of course there are the reflect magic's "vrrrrm" and chocobo's "crunchy" beak as well; they didn't know how to trigger to play properly in the game they were porting, so, yeah, a complete catastrophe lies deep within the sounds of FFIX PC.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #12 on: 2017-06-20 15:05:09 »
I answered that above, Fraggoso.  I created my own sound test.  But FF9 will work very differently to FF7.  There's going to be nothing in common aside from "Play [ID]"

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #13 on: 2017-06-21 12:03:27 »
I'm really mad that the AKAO files cant be used to recreate the sound effects as they where meant. xD
There's a sequencer for the Music but none for the sound effects (sadly)... Y_Y

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #14 on: 2017-06-21 12:31:10 »
That's because the music data, as far as I am aware, has a set standard - whereas the effects are a totally unique script created by Akao. And it will change from FF to FF.  So you'd need someone dedicated enough to reverse engineer his script - AND emulate the psx spu... Something no one can be bothered to do for such little overall gain.  If his script was a set standard for psx effects... then you'd have seen someone do it by now.

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #15 on: 2017-06-21 12:37:18 »
Thanks again DLPB.
Oh well, then the only hope left is that tirlititi can add something like a sound effects player.

Was it hard doing that in FFVII with Makou?
« Last Edit: 2017-06-22 07:21:28 by Fraggoso »

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #16 on: 2017-06-21 12:49:50 »
I don't know if this helps, but maybe someone on this site does know or has an idea how it works. http://www.psxdev.net/forum/index.php

Edit
But I highly doubt it.
« Last Edit: 2017-06-21 12:56:23 by Kaldarasha »

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #17 on: 2017-06-22 15:47:44 »
DLPB Is there a way we can chat?
Private Messages are blocked at your end.

Maybe Skype or good old ICQ? ^^

Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #18 on: 2017-06-22 15:54:59 »

Click at the fourth main topic here at the forum and you enter Qhimm's official chat room. ;)

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #19 on: 2017-06-22 15:57:04 »
Eeeeew that's so retro! xD

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #20 on: 2017-06-22 16:33:16 »
Fraggoso, I won't be of any help to you, unfortunately.  I don't have FF9 - and I haven't done any reversing of it.  I'm also way too busy with my own projects. You need to find someone willing to put the same dedication into ff9 that I do with ff7. It's a completely different game and will need a totally new approach. All the effects will need to be manually recorded and then  made to play by hijacking the relevant functions.  It's a lot of work.

Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #21 on: 2017-06-22 20:04:54 »
I don't want to you to help if you don't have the time.
I wanted to only ask you how you setup your sfx player in ffvii. I want to do the same and I think I know where I want to set it up. :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #22 on: 2017-06-22 20:09:09 »
I used my own dll and diverted functions to my own functions that call bass.dll functions :P

In other words, the sound in ff7 is completely replaced by bass functions - volume, balance, and so on.  It's not a "sfx player" - it's an audio dll called bass.dll (search online) being called from my own dll that has diverted the game's functions. My dll is called "ddraw.dll"  - which is loaded automatically when inside the root folder - after I have finished loading my own stuff, the real ddraw.dll and its functions are called, so the game doesn't crash.  In other words, my dll is a proxy dll.


Fraggoso

  • *
  • Posts: 278
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #23 on: 2017-06-22 20:13:23 »
Oh wow... that Sounds like something I can't do. xD i thought you made your own sfx player with Makou reactor and you played the sfx one by one...
Now I've tears in my eyes dude. :D

Let's see what I can make. You know, whatever floats your boat right? :)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: AKAO converter for sound effects - FFIX
« Reply #24 on: 2017-06-22 20:19:06 »
The above is how I coded in the replacement audio functions. How else would FF7 play the effects I made?  The actual effects I recorded manually (ogg format) with Adobe Audition from Mednafen using a sound test I created with Makou.

If FF9 already has the effects outside in a format you can use, all you'll need to do is record the effects somehow by creating your own sound test for FF9 PSX.  I have no idea how you'd do that.
« Last Edit: 2017-06-22 20:20:37 by DLPB »