Jump to content

Home

MI2SE: Remastered music in Classic Mode.


OzzieMonkey

Recommended Posts

Hi all,

if you've seen my posts in the Return to Monkey Island topic, you'll know that I've managed to figure out a possible way to replace the MT32 recordings of MI2SE with the remastered tracks in order to play them in classic mode. @Scummbuddy recommended that I create a new topic for some discussion on this. 


UPDATE: I've fixed all the issues that were listed below with a lot of editing and adding loop markers into the encoding of each file manually. While I'm at it I figured I'd build an SFXOriginal.xwb with the remastered sound effects too, so when that's done I'll upload everything to my Google Drive and post a link. 

 

Here is my own modified version of @Bennyboy's XACT template for repacking the music. It already has the newly built MusicOriginal.xwb file that you need to replace the one in the game's datafiles. I would love it if people could test it out because I have run into some issues and was hoping that others on this forum who are a bit more technically minded might be able to figure out how to fix them:

 

So far, the tracks and transitions seem to play in the right locations, but there are a number of locations where the track doesn't loop to the right spot:

Island hopping screen on Dread's ship

Stan's

Rapp Scallion

 

To make it easier for everyone I've also attached a save file where you can test those spots I mentioned above.

savegame.001
 

Edited by OzzieMonkey
  • Like 2
  • Thanks 3
Link to comment
Share on other sites

Just an update on the looping situation, I did some further testing and it seems as though every looping track loops to the wrong position (so all of woodtick is a bit of a mess). Fortunately, I believe I've detected the issue. Basically the tracks extracted using the MI Explorer have to then be converted into a format that XACT recognises, and during the conversion the tracks got extended and now don't match the timestamp of the original MT32 files. So now, I'm going in and putting each individual file into Sony Vegas and rendering them as a .wav to be 100% sure I'm getting the same files at the same length, then I'll rebuild the wavebank and report back. 

 

Also, during all this messing, I found that by editing some tracks I can get back previously lost transitions, such as the buildup and crescendo that hits when Largo says "Look out world! The most fearsome pirate of all time will soon sail the seas again!", smoothly transitioning into the Voodoo Lady's theme, rather than cutting to the Voodoo theme when largo says his line and missing out on that build which really added to the presentation of the scene in the original game. I have no idea how to bring back the little tune that plays when the coffin gets lifted up in the swamp though, it's part of a set of layered transitions that are meant to be event triggered, but without access to scripting or any real understanding of the MI2_MUSIC IMPLEMENTATION Excel file, I'm at a loss. 

 

UPDATE: Ok, so I did all that and it still doesn't loop correctly. I'm honestly not sure what the issue is. The tracks line up exactly, but it seems as though the game just doesn't want to obey any looping instructions when they're replaced with SE music. Idk, maybe I've done something wrong in XACT? 
 

Edited by OzzieMonkey
  • Thanks 1
Link to comment
Share on other sites

Hoo boy, this is becoming a lot more of an undertaking that I originally thought. It seems as though the way the original files were encoded, they retained the ability to play an intro section of the music, then the main bit, followed by looping to a specific timestamp instead of the beginning, That functionality is lost as soon as the files are converted to a format XACT is compatible with. For example, in-game you'd get the Rapp Scallion resurrection cue, followed by his theme, but when the track is over it loops back to the resurrection cue instead of just endlessly looping like it should, which is not ideal. 

 

Thankfully, I'm pretty good at editing, so I'm in the process of editing all the tracks in Audacity so they loop for longer, basically enough time that most people playing the game will never reach the part where the incorrect loop happens. This is all dependant on the location of the music, so for example Dread's map screen or any of the island maps don't loop as long as, say, the Voodoo Lady's or the various Woodtick rooms. 

 

I also have a working theory on why the little transition that plays between the swamp and the Voodoo Lady's doesn't play, which I believe lies in the MI2_MUSIC IMPLEMENTATION.csv file. I'll see if I'm right and report back with my findings.

 

Of course, if anyobdy knows of a way to convert an APCM encoded .wav file to a PCM .wav file without losing the loop triggers in the process, I'd love to know about it cause it'd save me a lot of hassle :p 

Edited by OzzieMonkey
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

12 hours ago, OzzieMonkey said:

 

Of course, if anyobdy knows of a way to convert an APCM encoded .wav file to a PCM .wav file without losing the loop triggers in the process, I'd love to know about it cause it'd save me a lot of hassle :p 

Without having looked much at the data (or your conversion) - or knowing much about how BG's template works, I'm pretty sure the .wav files are standard WAV (containing ADPCM data, which is just compressed) with no extra info - if memory serves, the loop points are defined in the .xsb file (which is a relatively complex format), not the xwb file. So if you're not replacing that one, I'd expect it to really just use the loops from the old music. The .csv file might be telling the iMUSE-wannabe engine where to jump (haven't looked at that either), but at least where to jump from is likely handled by events defined in the .xsb.

 

But I could be completely wrong about that, since - again - I haven't actually looked much at it at all. 🙂

  • Like 1
Link to comment
Share on other sites

13 minutes ago, Serge said:

Without having looked much at the data (or your conversion) - or knowing much about how BG's template works, I'm pretty sure the .wav files are standard WAV (containing ADPCM data, which is just compressed) with no extra info - if memory serves, the loop points are defined in the .xsb file (which is a relatively complex format), not the xwb file. So if you're not replacing that one, I'd expect it to really just use the loops from the old music. The .csv file might be telling the iMUSE-wannabe engine where to jump (haven't looked at that either), but at least where to jump from is likely handled by events defined in the .xsb.

 

But I could be completely wrong about that, since - again - I haven't actually looked much at it at all. 🙂

In an ideal world, that would be the case, yes 😂 Sadly I can't even put the original extracted file as they are into a new wavebank because XACT requires uncompressed wav files. I've also noticed that depending on the conversion software, the files end up longer than they were before, looping from a speficic timecode and then continuing on. It's all a bit of a headache, and I wish I knew what the missing step was, but for now I'm just gonna fish up these edits and give it a test.

Link to comment
Share on other sites

As Serge says, its not the audio data that contains the loops its the soundbank (xsb file). You can also build soundbanks in XACT, you drag a track from the wavebank into it and build cues and loop points but that will be a hassle.

Again as Serge says, you would expect the game to just use the loops from the xsb so I would guess its one of:

  • ADPCM blocksize - this can affect looping as the blocksize affects block alignment. Try lowering Samples per block on the wavebank.
  • Your wavebank has the SYNC_DISABLED and  BANK+ENTRYNAMES flags set - the original doesn't. On the wavebank in xact turn off 'friendly names' and turn on 'sync in-game data'. I havent built it to try but these should remove those flags.
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Bennyboy said:

As Serge says, its not the audio data that contains the loops its the soundbank (xsb file). You can also build soundbanks in XACT, you drag a track from the wavebank into it and build cues and loop points but that will be a hassle.

Again as Serge says, you would expect the game to just use the loops from the xsb so I would guess its one of:

  • ADPCM blocksize - this can affect looping as the blocksize affects block alignment. Try lowering Samples per block on the wavebank.
  • Your wavebank has the SYNC_DISABLED and  BANK+ENTRYNAMES flags set - the original doesn't. On the wavebank in xact turn off 'friendly names' and turn on 'sync in-game data'. I havent built it to try but these should remove those flags.

That makes way more sense! I had Friendly names on and sync in-game data off. Do you happen to know what the original samples ber block was? Or is that gonna be a trail and error thing?

 

Another question I have: What does the MI2SE Rebuild.xgs file do?

Edited by OzzieMonkey
Link to comment
Share on other sites

2 hours ago, Bennyboy said:

XGS files are settings for the project. The blocksize might not be it, its just a possibility as I know that it can affect loop points.

Yeah I messed with it some more, no dice. I've looked into it a bit further, and apparently my hunch was correct. Although developers CAN create loops in the Soundback using XACT, some don't and instead rely on .wav files encoded with loop points using Wavosaur. Those appear to get lost as soon as they are re-encoded from the ADPCM format I initially extracted them from using your Extractor (great program btw, couldn't get this far without it). Basically, I still need to do that stupid amount of editing to put the loops back in, but at least now I only have to create one loop point instead of just artbitrarily looping different songs at varying lengths depending on guesswork around how long people genereally spend in each environment.  If this all goes to plan, you could theoretically stay in the same location for hours, days, weeks, ETERNITY and never hear the faulty loop, which is what the original does. 

 

Thanks a lot for your help! I'll continue to test things until this works. I think it's worth it.

Edited by OzzieMonkey
  • Thanks 1
Link to comment
Share on other sites

Where does it sound noticeably wrong? I've just rebuilt the bank and I don't notice any issues so far in woodtick.

I cant use your save from the first post, every version of SE2 that I have packs their saves into monkey2.bin.

Link to comment
Share on other sites

16 minutes ago, Bennyboy said:

Where does it sound noticeably wrong? I've just rebuilt the bank and I don't notice any issues so far in woodtick.

I cant use your save from the first post, every version of SE2 that I have packs their saves into monkey2.bin.

So with Woodtick, let's say you walk into the Woodsmith's. The whole track plays and then after a few seconds of the song playing over again, the song loops and repeats those few seconds and the rest of the song.

 

The structure of the songs looks like this:

Whole song + First few seconds of song

OR

Intro + whole mid section + First few seconds of mid section.

 

With the first example (and what happens in all of woodtick), the tacked on first few seconds makes it loop straight after that and instead of playing the rest of the song, it plays from the beginning.

 

 The second example occurs somewhere like the Rapp Scallion scene, where the intro is the bit that playd when he's resurrected, then his theme during dialog. At the end of that song, it once again plays the first few seconds that happen after the intro, then abruptly cuts to the intro again.

 

What should be happening is this:

Whole Song looped

 

Intro played once,  middle looped 

Link to comment
Share on other sites

Having a closer look into the wavebank format again (its been years), it looks to me like the loop points are embedded in the wavebank not the soundbank as I said earlier. If that's the case then possible solutions are:

  • Rename the MusicNew wavebank + soundbank to MusicOriginal so the game just uses them. I just had a quick test of this, it didn't work so I changed the internal names inside the wavebank and soundbank to MusicOriginal. This didn't work as there's a checksum in the soundbank, so I fixed that and...it worked. Except of course the wrong tracks play as they are listed in a different order in musicnew and musicoriginal.

 

  • You could patch the loop points back into the wavebank after you've built it. If you use the unxwb tool with the -l and -v flags you'll be able to see the region offset for each sound. I think that's the start position for looped audio, its a 4 byte value. So you could make a tool to change those region offset values in the new wavebank.
  • Thanks 1
Link to comment
Share on other sites

I edited loop points into a few tracks using Wavosaur, then put them into XACT with the rest of the tracks, built the Wavebank,  and BOOM! It works! We are cooking with Rapp Scallion's gas burners now people! Still gotta edited the files which will take some time but at least now it'll ensure infinite looping :D 

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Laserschwert said:

Is this something that can be achieved via a delta patch, or would this require a download of the complete recompressed music? The latter would be more problematic to share (legally) than what the Ultimate Talkies do.

 

Essentially it works the same way as how people use the Cursed! MI1 soundtrack in the first Special Edition

The only thing that's needed for it to work is the MusicOriginal.xwb file that is produced when I build it in XACT. Once you replace the file in the game's audio folder, you're good to go!  

Link to comment
Share on other sites

1 hour ago, Laserschwert said:

If you got the loop markers working, wouldn't this just need a batch or script to extract everything needed from the game data files, and apply those changes? I'm just thinking that it might be safer to NOT share the music itself.

So the loop markers had to be manually added in by me in sound editing software AFTER the music was extracted and converted into a format that XACT could recognise. It appears that merely the act of re-encoding the files removes the loop markers entirely, as there is a little N under the Loop heading in my wavebank, and a Y when I add the markers back in. Anyone who wanted to do what I did would have to spend hours editing the loops back in, and yeah, I did it cause I'm a masochist with too much time on my hands but I can't expect everyone to do that so a completed Wavebank is much more preferable. I guess I'm just wondering what the major difference would be in sharing that from, say, the Cursed soundtrack that also supplied a repacked Wavebank. You still need to purchase the game to get it to work. 

If there's a script that can do all my editing automatically, that would be good, but I would have no idea where to begin with that. 

Link to comment
Share on other sites

4 minutes ago, Laserschwert said:

The Cursed soundtrack was a completely (well, mostly) original work though, while this "simply" contains a converted version of the original audio.

 

But yeah, most likely no one will mind.

I totally understand where you're coming from though, don't get me wrong, I definitely don't want to break any rules, I love this place :D I also couldn't do all this work and not share with everyone else, that's MI fan rules 101. I guess if forum Mods decide it's not a good idea to share it publicly, I'll settle for PM'ing people who are interested in trying it out.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...