FF7 PSX sound effects format

  • Thread starter Thread starter Phanoo
  • Start date Start date
Status
Not open for further replies.
Here is the current version : http://sdamo.io/ff7/ff7psxsfx.zip

There is still a lot of inaccuracies in the playback, don't mind  :D

ff7psxsfx.png


You get a list of the commands being played, and the nice thing is I managed to read the samples directly from INSTR.ALL and INSTR.DAT. I've found that even the simpliest waveforms are sampled. PSound didn't extracted them when I scanned INSTR.ALL, that's why I initially thought those waveform were generated. Probably they were too short to trigger its detection system.
 
C2 could be the pan or the marker if it is a stereo or mono effect. At last I can't see in the list that this is handled somewhere.
 
From what I understood, all sounds are mono, but the engine can play two of them at the same time, achieving a stereo effect. The sound themselves don't seem to know about their panning

Some currently unknown commands :
C2, C6, B6, BA, D0, D1, DA, DC, DD, DF
Most of them seems to have no parameters, I even tried to remove C2 from some sounds and it didn't make any hearable difference  :?

If you want to try things with the sounds you can edit the FF7 disc1 iso, set the bytes from 0x1066c8 to 0x1066d2 to 0xA0, and write the sound data you want at 0x1066d3 (no size limit). It will play your sound when you move the cursor on the title screen. To do fast edits/tests, make a savestate before the Squaresoft logo shows up (it loads the sound data here), and toggle FPS limit with F4 (on ePSXe) to go faster.
 
i have a good audio setup. if u want to run by me 2 versions with different codes i can tell you if i hear a difference
 
This is seriously impressive....  you can make out exactly what sounds they are.  It's taken over 20 years for someone to tackle it.

Kudos!

Should be noted that some effects should loop indefinitely and perhaps thats what one of the missing opcodes does?
 
Last edited:
Thx ! Yeah it puzzled me no one already did that. It's not that hard btw, having some previous MIDI / sound synthesis knowledge helps a lot.

If you want to play more with my program please re-download it (same url : http://sdamo.io/ff7/ff7psxsfx.zip), I noticed I forgot to initialize a variable for the noise generator, creating very loud static sound instead of the actual noise... I hope no ears has been damaged, that should be fixed now  ;)

You're right about the looping sound effects, there may be a command for that ! Do you know which sounds are looping so I can check them ? I was thinking about the alarm or elevator sound, but have no idea what are their ID (0...760)
 
Last edited:
I tried to locate - but I couldn't work out if the IDs are in order.  The first ones appear to be.  If in order, I will get you a list tonight.

The looping section doesnt have to be from start...  often I see what seems to be a flange effect that decays and then a looping section that can last up to a few seconds.  Loops can last much longer.

Also, you should be aware that there is a random effect operation too.  For example, birds will cheep looped, but never in a fixed pattern. It may be that it can play more channels at same time?  Though I find that unlikely.
 
Last edited:
Bug:  See effect 617.  If you play more than once, the pitch isnt being reset.  Other things may not be being reset to default on new start.
 
Ok i'll look at that ;)

I've found that the infinite loop command is CA. Sounds that use infinite looping finish with CA instead of A0, so I didnt detected them since I checked for the A0 termination before adding them to the list ! Sound count is now 888, don't try with your version to match the numbers with FF7PC you'll get an offset due to that...

:)

I've also added the support for few commands :


- B5 : frequency LFO depth set
- B6 : stop frequency LFO
- BA : stop volume LFO
- DC : set the duration for all upcoming notes
- DD : frequency LFO depth fade

I'll release the updated version in the next days ;)
 
Last edited:
Impressive! 

Do you think the sound will ever get v. close to the actual PSX sound?

The thing to remember also is PSX adds its own variety of reverb - but I've noticed that only on certain effects.  I don't remember cursor sfx having it - but many effects do.  You can always tell because a no reverb effect always shows a hard stop in wave form... and a reverb doesnt.

So one of the ops will be reverb maybe?
 
Last edited:
I could add it yeah. Taking an existing PSX reverb code if a open source one is available, or taking the reverb I already made for my music software.

As for the sounds itself, I'm not sure they will get close to the originals. Some already are, but some others are really hard to get right, especially when they make extensive use of LFO's :/
 
Last edited:
Very likely C2 is reverb.

I know that cursor and error don't have it, but cancel and menu do (before looking at code).  And so far that is indeed how it looks in your program.
 
You seem right ! Although it doesn't work on the title screen which has no music (maybe the reverb gets disabled ?). I tested on the train scene and using C2 makes the sound reverbered like the music, while C3 stops making it reverbered
 
Last edited:
Looking forward to latest release.

Also, certain effects like the alarm in reactor 1 are stereo.
 
Last edited:
Last edited:
I guess the number 731 come from the pc version, maybe it's due to the fact that some of the layered sounds of the psx version (like the 1st and 2nd sound both makes the menu sound ) are already mixed into a single sound for the PC ?

Also the total sound count increased in the last version because I numbered the empty sounds effect.all has. The only purpose is to keep track of them so the application can re-write a correct effect.all file (I guess the file won't work anymore if I save it without those 'dummy' sounds)

BTW, thank you very much for your involvement, it helps a lot and gives me more motivation to finish this project !

I wrote a document describing how the format works, the list of command and everything else here : http://sdamo.io/ff7/index.php
It's not 100% up to date and subject to change.
 
Last edited:
Even in the PSX version, the sound test is the same.  So if it's mixing, each ID is still its own ID 0 but mixed from 2 sources?

This is super impressive stuff.
 
Hey thanks !

We could merge our opcodes lists, from what i see in your code you have some unidentified ones that I've already understood, and you have some others that I weren't aware of.

http://sdamo.io/ff7/
https://github.com/Akari1982/q-gears/blob/master/utilities/ffvii_sound_dumper/src/AkaoParser.cpp

I'm especially interested by the LFO table, which is too much work to reverse engineer by ear. Can you confirm it's your "akao_wave_table" array ?

I currently have a totally custom engine that playbacks the sound, but for accuracy it would be better to use some real PSX emulation so I can focus on the sound parsing a bit like you did. I'm pretty sure you could play the sounds with your engine with minor tweaks (implementing the commands that are used in SFXs like the noise generator), since the format is close to the one used for the songs. The note handling is probably different too, since for the SFXs the pitch and duration are merged into the same byte
 
Last edited:
Status
Not open for further replies.
Back
Top