Will SVM Tools ever support extraction of Discworld 2 music?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Will SVM Tools ever support extraction of Discworld 2 music?

Post by marzipan »

I've always admired the soundtrack for the game and was hoping there would be a means nowadays of retrieving the music from the .MUS files, but it would appear no-one out there has made a tool publically (or easily) available for a simpleton like me to dive into.

I periodically check the buildbot now and then to see if the tools package has added any new functions but it looks like the same old tools so far. If I say "pretty please with a cherry on top" enough times will a tool of sorts magically materialise sooner? ;)

Seldon
Posts: 101
Joined: Sun Feb 24, 2008 9:53 am
Location: Poland

Post by Seldon »

I had the same problem as you before. Here you can find source code, that I made to convert MUS files to PCM format. You have to compile it yourself unfortunately, because despite looking I couldn't find compiled executable.
I could possibly share Discworld 2 music which I already extracted and converted to mp3, but I'm not sure if it's legal to distribute it.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

Unfortunately my knowledge of compiling source code is limited to installing Cygwin or MinGW, grabbing some source, running Makefile and crossing fingers that everything will just work. The code you showed in that post I'm not sure what to do with, like should I save it to a specifically-named .c file or something? Where would I get the compile-ready setup necessary to just run this baby?

In that thread you linked to you offered a pre-compiled executable back then, but naturally the link just has to be long extinct. When you say you couldn't find a compiled executable, do you mean on the web in general or you mean you lost the one you made back then?

(At this rate, I'd even be happy to use a Python script, seeing as I already have Python installed atm.)

Seldon
Posts: 101
Joined: Sun Feb 24, 2008 9:53 am
Location: Poland

Post by Seldon »

OK, after 3 or 4 years I have installed C++ IDE and compiled it.
This is command-line tool, so you have to copy it to game folder and use it with two parameters: in and out file, for example:
d2_decode unseen.mus unseen.raw
The resulting files are raw PCM data without any header so you have to open them in some sound editor.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

Oh, um, is it possible you could compile a 32-bit version? I'm currently stuck with a 32-bit Windows for the time being. Sorry for the inconvenience.

Seldon
Posts: 101
Joined: Sun Feb 24, 2008 9:53 am
Location: Poland

Post by Seldon »

Try this.

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

I still get the same error message as the last one about an incompatible Windows??? :?

Seldon
Posts: 101
Joined: Sun Feb 24, 2008 9:53 am
Location: Poland

Post by Seldon »

Sorry, as I wrote it's been few years since I compiled anything. Check link from previous post again. I've updated it and now it should work (at least compiled file has different filesize).

marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

You are very much awesome. :D Tested it with TITLE.MUS, ran the RAW through GoldWave (for the record, you need to select "PCM signed 16 bit, little endian, mono" with a sample rate of 22050Hz) and converted it to WAV format. Now I hopefully have a decent ringtone to use in future amongst other things at least! Thank you. :)

Guess I'll get round to converting the rest of the soundtrack...

Seldon
Posts: 101
Joined: Sun Feb 24, 2008 9:53 am
Location: Poland

Post by Seldon »

I'm glad I could help. However, just for the record: vital part of the code comes straight from ScummVM, so your appreciation should go to real developers, I just used it.


To speedup your conversion process you can use such batch file:

for %%f in (*.mus) do (
d2_decode "%%~nf.mus" "%%~nf.raw"
)

Post Reply