Modding rundown: Sound

Started by Noelemahc, December 05, 2006, 11:53PM

Previous topic - Next topic
There's lots of wav types.  It has to be PCM, 16-bit 22050khz.

The music wavs seem to be 44.1kHz and stereo instead of mono. Has anyone been able to import these type of file into the zss?

It is possible to get the music wav's using 'towav', but these files cannot be imported directly back using winstrol's program (they can be dragged and dropped but will not transfer properly).

The game does recognize mono 22050Hz for music also, however there seems to be a problem with doing so. Unless forced using script (you can use script to force music to play), the music won;t play at the right times, even if the correct hashs are used. For instance, if you export MUA music using 'towav' then convert it into mono 22050Hz, and then import it into a zss, under _c as combat music, the game recognizes it as ambient music (when not fighting) and will override the _a music file. This means there is no combat music, instead only ambient music. If this problem could be fixed, it may not be necessary to have a program to import 44.1kHz stereo, but i haven't found a way to fix it.

I tried importing into the zss different formats: stereo, a different frequency (41k), and 32bit, although the sound of it changed (because the frequency changing), the problem still occured where the music would stop playing when you in a combat situation, and then start back again when in a non-combat situation. This means the problem may not be dependent on the sound format, but something else.

I did notice that in the file listing in zsm editor (for a working, original game sound file) the music _c only has one file associated with it, but when using 'towav' to decompile it, there are two files that are generated, maybe this has something to do with the problem. I did try inserting two _c files with the same hashs, but it didn't solve the problem

OK great news!
I did some more searching in the zss files, and i noticed a byte which had not been discussed (at least i don't think it has been discussed). I noticed it was different for the music files (besides the 28A0 instead of 2256 for the 41kHz music files). In the section when listing all the 'ID, white space, 2256', there is a byte in the 'white space' that should be set to 22 (two bytes back from 2256). Changing this allows the game to play the music correctly!! Instead of changing zsmeditor to account for this, it is possible to mannually change that byte in the new sound files. In addition, you can copy the music sound data bytes directly from the original game files, and modify the 2256 to 28A0 to account for their 41kHz frequency. I will post a how-to in another thread shortly

Long story short, it is now possible to convert the music files into a new zss

August 11, 2008, 05:35AM #304 Last Edit: August 11, 2008, 09:08AM by Teancum
The Gamecube and Wii both use GCADPCM (a Gamecube codec).  The codec can be found online for installing, and so hex-replacing sound files is possible.  For instance, taking Hawkeye's sounds from the Xbox and injecting raw GCADPCM files over the original Xbox files will, in theory, give you sounds for Hawkeye that will work on the Wii.

Right now nobody has a modded Wii, so I have no way of testing this theory.


*EDIT*
Also, from everything I've been able to see, the PS2 and PSP use different variants of the Playstation VAG format.  Near as I can tell (and as near as Noel documented before) they're just at different rates, the PSP versions being much lower def to ensure they'd fit on the disc.   The issue here is that the file names are not stored in the ZSM/ZSS files, so it's really tough to know, seeing as how I can't even hack things to open them in ZSM Editor.  If PS2/PSP sounds are gonna get done, it's gonna all be in hex.

More info on XML1/2 Gamecube and MUA Wii sounds:

-It uses 22050khz GCADPCM wav codecs
-The files table has no actual names, but is replaced by "DSP"
-The first two bytes in that section are the start location of a file, followed by to 00 bytes, followed by the size (see below)


So I've been doing more research - the next step in checking various sound containers out is whether the hashes match between platforms.  I have a hunch that (in lamens terms) the table that defines what plays at what time is the same across all types.  If that's the case then building Wii, PS2 and PSP sound files can be done (and technically can be done on the 360 too, but I don't have the XNA tools required).  Also if that's the case, it means PS2 and PSP owners can have more mods.  If someone steps up to do PSP or PS2 mods let me know and I'll help you with your sounds.

If I knew how to convert models to PS2 format I would've made my mods compatible with PS2 and ask for that lol.

Yeah, I'm hoping someday I can figure out how to make models work on PS2/Xbox, but I would have to play a lot with the exporter and hex editing, so for now I'm gonna figure out sounds and animations.  I'd rather have the anims anyways.  Boltons can cover most model needs if necessary.

April 19, 2010, 06:04PM #309 Last Edit: April 19, 2010, 06:09PM by LarsAlexandersson
Rather than using an ol xv123. How bout: HDD Hex Editor Neo. It has: New automaticly open tab when open the file & even better than the old one.

Trust me, it works too. No pain, no gain. :thumbsup:
Call me Lars. I'm Power Cosmic no more.

"Trying to solve mysteries of modding here"

My Progress:
http://marvelmods.com/forum/index.php/topic,4671.0.html

Feel free to mod my releases, as long you credit me:
http://marvelmods.com/forum/index.php/topic,4488.0.html

010 Editor is by far the best hex editor I've ever used, and I have 10+ years of experience.