<- 1  -   of 75 ->
^^
vv
List results:
Search options:
Use \ before commas in usernames
Edit history:
Aruki: 2014-08-05 08:22:41 am
Quote from Baby Sheegoth:
Wow, something I actually know something about.

They're mono tracks, but each track has 2 parts which play simultaneously in either channel to obtain a stereo response. Not sure why that is. This applies only to the music, though. As far as I know.


Makes sense as a workaround to get stereo music since DSP files have to be mono. Sound effects don't really strike me as something that needs to be stereo, though...? Considering it'd be biased to one channel or the other depending on the location of the source of the sound.

Quote from Antidote:
I've been able to get sounds out of AGSC files


How?
Edit history:
coppro: 2014-08-05 09:12:26 am
Quote from Paraxade:
Are we sure the sounds are even stereo? The DSPADPCM docs seem to stress that the input files for encoding DSP should be mono.


Ah, yes, this is what I was looking for.

Quote from Baby Sheegoth:
Wow, something I actually know something about.

They're mono tracks, but each track has 2 parts which play simultaneously in either channel to obtain a stereo response. Not sure why that is. This applies only to the music, though. As far as I know.


Yeah, that's true for Prime 1. Prime 2 uses a custom header, and its .DSP file interleaves the two parts in very large chunks. So it's probably still the same model under the hood, just put into one file. Maybe I should switch over to Prime 1 stuff (been looking mostly at Prime 2) because that's probably easier to figure out to start. Prime 1 uses the standard header.
The sounds are most likely 22050 hz, 16-bit mono sounds, which is what I usually encounter when extracting game sound effects from this time period.  That being said, there could also be sound effects (such as the ambient space "groan" sound effect on the very first Frigate level in Prime 1) which play at a lower sample rate, such as 11025 hz. 

You can hear some sound effects in the AGSC files, albeit very distorted if you import the sounds as raw audio in Audacity as ADPCM audio.  I got very similar results if you use VGMToolbox and generate a GENH file (which attaches a header to the sound file to make the sound playable) and tried to use the various ADPCM codecs).  Sometimes it crashes and other times, it plays audio again, just very distorted.
if the sounds aren't perfectly trimmed you could try to find the start and end of them by looking for long runs of silence values. granted this doesn't really help in figuring out the format.
Quote from Paraxade:
Quote from Antidote:
I've been able to get sounds out of AGSC files


How?

Messing around in Audacity, like I said, nothing really useful.
Edit history:
DJGrenola: 2014-08-06 05:54:16 am
DJGrenola: 2014-08-06 05:50:51 am
DJGrenola: 2014-08-06 05:43:36 am
DJGrenola: 2014-08-06 05:36:49 am
so here's an idea I tried last night which actually gave me disappointingly little insight into the couple of AGSC files I tried it on, but here is the principle:

- go into dolphin and use its debugger to take RAM and ARAM dumps while playing
- pick an AGSC file you believe is in memory at this time
- write software to cut the AGSC file into short chunks (I used 128 bytes -- any less than this and you start to get false positives, although this is interesting in itself because it implies short sequences that turn up more than once) and search the RAM and ARAM dumps for them. the idea is to find long contiguous runs of chunks that are common in both the AGSC and RAM/ARAM, i.e. large pieces of the AGSC turning up in memory.
- in this way you can find out which parts of the AGSC are loaded into which parts of the RAM. once you have these coarse, approximate locations you can either go in manually (like I did) using hex dumps and find the exact points in the AGSC where each chunk starts being loaded into RAM or ARAM, or (more sensibly) you can have your software do this fine-tuning once it's found the coarse position.

I got some results but they weren't very edifying in terms of trying to figure out the file format. maybe someone else would like to have a go.
Sorry for these questions out off the subject, but I think it's the best topic to post them :

- Is it possible to fix the Flaaghra's music that doesn't play entirely ? Since we have to rebuild the iso for every randomized seed, that would be nice to fix it at the same time. But I don't know if it's doable/simple
- Is it possible with the collision viewing tool to see the rooms loading triggers ? That would be awesome to have picture of every room with those loading zone colored !
- Same question with container box/eather. It's less useful but still cool
Edit history:
Aruki: 2014-08-06 07:53:28 am
Aruki: 2014-08-06 07:53:20 am
Aruki: 2014-08-06 07:52:54 am
Quote from A-M:
Sorry for these questions out off the subject, but I think it's the best topic to post them :

- Is it possible to fix the Flaaghra's music that doesn't play entirely ? Since we have to rebuild the iso for every randomized seed, that would be nice to fix it at the same time. But I don't know if it's doable/simple
- Is it possible with the collision viewing tool to see the rooms loading triggers ? That would be awesome to have picture of every room with those loading zone colored !
- Same question with container box/eather. It's less useful but still cool


Flaahgra's music isn't broken, it doesn't loop incorrectly. What plays in 0-00 is the entire track on disc. If you want the long version, it's a simple matter of grabbing the PAL music and putting it on the NTSC ISO.

As for the other two, the tool doesn't support trigger viewing just yet, but it will in the future. (Since I'm putting the most emphasis on editing though, not sure I'll bother displaying the aether box instead of just generating them automatically.)
Quote from Paraxade:
Flaahgra's music isn't broken, it doesn't loop incorrectly. What plays in 0-00 is the entire track on disc. If you want the long version, it's a simple matter of grabbing the PAL music and putting it on the NTSC ISO.

Oh ok, I thought it was a loop problem...

Quote from Paraxade:
As for the other two, the tool doesn't support trigger viewing just yet, but it will in the future. (Since I'm putting the most emphasis on editing though, not sure I'll bother displaying the aether box instead of just generating them automatically.)

Nice ! It will help a lot for wallcrawling, good luck with your code !
Earlier versions of Dolphin have less accurate audio emulation, which means that some sounds play without effects like reverb or room ambience, which allows "dry" unaltered sounds to play.  I've been able to record some of the sounds of the game through this way, which gets me the closest to the raw audio files.  Perhaps using the debugger in earlier versions of Dolphin will make things a bit clearer since audio effects processing is glitchy. 

Also, if anyone is interested in some of the sounds I recorded please let me know.
Edit history:
MrSinistar: 2014-08-08 02:07:18 am
MrSinistar: 2014-08-08 02:07:09 am
MrSinistar: 2014-08-08 02:07:08 am
MrSinistar: 2014-08-08 02:07:07 am
MrSinistar: 2014-08-08 02:00:34 am
Messed around with VGMToolbox again with the AGSC files.  I grabbed the "weapons" sound file (aka 0_8081183e.AGSC) and ran it through several of the various ADPCM codecs offered in VGMToolbox.  Of course, when I try to export the file with the "GameCube ADP/DTK 4-bit ADPCM" codec, the file doesn't want to play unless I made it stereo, which doesn't produce any good results. 

However, I did try out several other ADPCM codecs and I found that the Yamaha AICA 4-Bit ADPCM codec, although still distorted you can make out the Charge Beam and Plasma Beam Charge sound effects in the very beginning as well as various other weapon sounds.  I can now confirm for sure that the sounds are definitely mono and in 22050 hz.  We just need to find the right ADPCM codec or figure out what Retro did to the codec.  Other ADPCM codecs produce similar results but I could the sound effects the best through the Yamaha codec.  I attached the converted WAV, converted from AGSC to the Yamaha ADPCM codec, 22050hz, mono.  Please turn down your speakers, the sound is very distorted.

http://www20.zippyshare.com/v/38849594/file.html
Edit history:
Aruki: 2014-08-08 09:25:32 am
Aruki: 2014-08-08 09:19:22 am
So following that table in the header, you get another size value, and another chunk of data. Following that is a third size value that seems to cover most of the file. That might be all the raw audio; might get slightly better results to rip that out manually instead of using the entire AGSC. In any case, there's more data following the raw audio - it starts with a fourth size value that covers all the rest of the data in the file.

I can hear some of the War Wasp sound effects in Audacity, but pretty distorted.

EDIT: That last chunk of data might have some of the stuff we need; it seems to have offsets into the audio data
Yes, the third size value is definitely the raw ADPCM data.  Awesome, I was wondering what the last chunk of data was.  Great find, Paraxade!
As far as the codec goes I wouldn't be surprised if it uses the same encoding as the DSP files. Maybe we should try seeing if we can find enough data in the AGSCs to construct a DSP header out of them and then run it through dspadpcm or a similar tool?

I see all this data in these files and have no idea what it means lol, not sure I'll be too much more help on this.
It very well may be.  Since MP is such an early GCN title, it should to be using the standard devkit codec or something simple.

I'll contact hcs and the hcs64.com forums, now that we have an idea of how the AGSC files work.
Edit history:
DJGrenola: 2014-08-08 09:52:25 am
yeah, the last piece of the file is loaded into RAM separately so that always looked like it was important. you should be able to locate the raw ADPCM chunks within the AGSC by examining ARAM dumps using the method I described above. but I think you need to find metadata in order to get it to play back correctly.
I'll definitely play around with the ARAM dumps when I get home from work tonight.  Not too knowledgeable with debugging or programming, but I'll try my best.  So our understanding of the AGSC so far is this:

Quote:
1 chunk:
AGSC Header/Sound Table

2 chunk:
Loop points?

3 chunk:
ADPCM data

4 chunk:
Offsets
The fourth chunk contains more stuff than just offsets, the offsets is just the only thing that jumped out to me. I wouldn't be surprised to see sizes in there as well.
Ahh, gotcha.  Thanks for the clear-up.  I just realized we could also be looking at data for the effects information/commands such as pitch bends, etc.  That being said, wouldn't that data be more in the audio engine/executable side?
Yeah, I would think it would be. I'm not sure why that would be controlled by the sound file.
Okay, cool.  Yeah, it would be weird if the sound file controlled that information.  Out of curiousity, does Metroid Prime 3 use AGSC or is it a new file format?
Edit history:
Aruki: 2014-08-08 10:38:55 am
I haven't looked extensively, but AGSC is gone in Prime 3. I believe it uses .CSMP files for sound effects. I think there's a couple other audio formats as well, .CAUD and .STRM; not sure what they're used for.
I'll mess around with those as well when I get home since VGMToolbox has a little bit more support for Wii sound ripping.  Maybe we'll get lucky and get at least some sound effects.
CSMP seems be to similar to AGSC, CAUD looks like ATBL, and I'm assuming STRM is the music.  After a quick google search, a couple of other people tried to play CSMP files but it sounds like they get the same results that we're currently getting withe AGSCs. :\
Edit history:
Aruki: 2014-08-08 10:55:52 am
Aruki: 2014-08-08 10:54:09 am
Uhh, CAUD doesn't look anything like ATBL. ATBL is just a giant table of sound IDs; the first number is the number of IDs in the table, then there's that many 16-bit IDs, and that's it. CAUD looks more complex than that; I see a few floats in there among other stuff. Plus they wouldn't need anywhere near that many CAUD files if it was supposed to serve a similar purpose to ATBL.

STRM does seem to be the music, but then I'm not sure what the regular Audio folder with .fsb files is supposed to be.