ppmdu icon indicating copy to clipboard operation
ppmdu copied to clipboard

AudioUtil: Extracting all 999 BGM files together causes M02_BGM_D_02 to have mismatched instruments

Open internetakias opened this issue 8 years ago • 7 comments

Extracting it by itself is fine, though. Also, this doesn't seem to affect any other tracks as far as I'm aware. By itself: test.zip With m01_bgm_d_01 and m03_bgm_d_03 added in: test2.zip

internetakias avatar Aug 28 '16 21:08 internetakias

Hi! Sorry for the delay with the reply. ^^; What do you mean 999 BGM files? Because, there's at most 202 tracks for PMD:EoS. Not 999.

First, you did use that on Pokemon Mystery Dungeon Explorers of Sky/Time/Darkness, right? Then, what did you do exactly? What command line did you type to get this result? And did you mess with the content of the extracted rom?

PsyCommando avatar Sep 01 '16 20:09 PsyCommando

I meant the BGM files for the game 999: 9 Hours 9 Persons 9 Doors which your tool works with

internetakias avatar Sep 02 '16 19:09 internetakias

Oh.. Sorry, I didn't realize.. ^^;

That's really interesting.. I wonder what this game does differently than the others.. It might have to do with the game using separate files for storing samples I guess. I'll look into it. But, right now I'm pretty busy with the script editor and restructuring.

Also, btw, did you notice any other issues with the output, when comparing the music with the original?

PsyCommando avatar Sep 02 '16 23:09 PsyCommando

Aside from the known PCM16-samples-being-too-high-pitched issue, there's also some sample distortion in at least one track (M05_BGM_E_01, it's about 5 seconds in but I'm sure you'll know when you hear it). EDIT: How it's supposed to sound like: https://www.youtube.com/watch?v=zetiid4RVKg EDIT2: This is another known issue but the lack of LFOs affects some tracks like https://www.youtube.com/watch?v=68gTs_OE-oY (M14_BGM_E_08)

internetakias avatar Sep 03 '16 10:09 internetakias

Thanks! You're right its pretty obvious XD

I think it might be the way I tried to interpret the LFO parameter by default. I attempted to handle some LFO parameters below the max oscillation frequency of the SF2 LFOs but, I'm pretty sure the way I interpret the depth parameter is completely wrong. It didn't show much with the PMD2 tracks, so I left it in.

But, it can be disabled for now. If you put the "-nofx" option on the command line it should export it without that weird effect.

About the the other track, its not just the LFO in this case. Because of the way the release parameter of a volume envelope works, I can't bake it into the sample to bypass the sf2 format's limitation of forcing logarithmic envelope curves. So I just convert the release parameter as is, and it makes really short envelopes that don't sound anything like the original. Its something I tried to find a formula or something to try to make it translate better to sf2, but I'm not sure how to do this. I saw how vgmtrans seems to be doing that translation with nitro composer files. But it seems like I'd need another approach in this case since after trying their algorithm, it sounded weird. But their algorithm is meant for nitro composer, not DSE.

I wish I had more audio and audio math know-how. I've been asking around for a while and I couldn't seem to get much help with finding out what those values represents. Or how to convert them into something more usable. Disassembling the DSE engine doesn't really help much anymore because I don't know what I'm looking for in this case.

PsyCommando avatar Sep 03 '16 21:09 PsyCommando

-nofx did indeed fix the problem with the first track. Thanks. Also, perhaps you should seek the help of someone with the necessary know-how?

internetakias avatar Sep 04 '16 00:09 internetakias

Good!

And, I tried on the HCS forums, and I got some help with a few things. But it seems the others weren't that sure either. Some offered help, but I haven't heard back. :/

Its probably because I'd need someone with experience to take a look at this. And people are probably busy with their own things.

PsyCommando avatar Sep 04 '16 21:09 PsyCommando