Another Wolfenstein thread

Where exactly would I find the entire game's MIDI soundtrack? I've looked around and was only able to get a handful of tracks.

Share this post


Link to post

The game's soundtrack is in IMF format, not MIDI (the original variant without header).

You can open the AUDIOT.* file with SLADE and extract the songs this way. You can even select them all and use SLADE's console command "addimfheader" to give them a header which will allow ZDoom to recognize and play them.

There might be IMF2MIDI tools somewhere, I don't know. ZDoom uses its OPL synth to play them if I'm not mistaken.

Share this post


Link to post

Get an editor and extract the files. You'll get some IMF files. What you do with them, I don't want to know.

Man, SLADE3 is powerful.

Share this post


Link to post
Technician said:

You have the game file?


Of course, I bought the game off Steam quite some time ago.

Also I read that there is an IMF2MIDI and DRO2MIDI but it seems DRO2MIDI is producing 1kb empty files.

I have been able to find a small number of songs on various Wolf3d sites but not every song.

Share this post


Link to post
Gez said:

You can open the AUDIOT.* file with SLADE and extract the songs this way. You can even select them all and use SLADE's console command "addimfheader" to give them a header which will allow ZDoom to recognize and play them.

I can't get this to work. The console command appears to work just fine (the entries are modified) but the songs produce complete silence when played.

[EDIT] Never mind -- it's working, but the volume is incredibly low. They sound pretty damn accurate in-game though. :)

[DOUBLE-EDIT] Interesting... I tried doing the same conversion method for Major Stryker's music (which I've actually wanted to use for quite some time now), and it almost worked. The conversion was fine, but the playback speed is too fast despite this page claiming otherwise. Could be a mislabel, though -- is there any way to make ZDoom use 560Hz playback?

Share this post


Link to post
Xaser said:

I can't get this to work. The console command appears to work just fine (the entries are modified) but the songs produce complete silence when played.

[EDIT] Never mind -- it's working, but the volume is incredibly low. They sound pretty damn accurate in-game though. :)

[DOUBLE-EDIT] Interesting... I tried doing the same conversion method for Major Stryker's music (which I've actually wanted to use for quite some time now), and it almost worked. The conversion was fine, but the playback speed is too fast despite this page claiming otherwise. Could be a mislabel, though -- is there any way to make ZDoom use 560Hz playback?

The code in SLADE is basically an automated version of method #2 here.

Share this post


Link to post

I didn't know you made such software Andrew, cool stuff. Tho when I try to output a song it is written as a 39 byte MIDI file.

Reading from : dungeon.imf
Writing to : dungeon.mid

- Warning: Bad operator found: 0x3a
- Warning: Bad operator found: 0x4f
- Warning: Unknown register found: 0x06
Loaded 10 register writes, 9 delays
Found 0 melodic instruments, 0 drums
Saved MIDI with 1 tracks, total size 3.9K
Finished.

Share this post


Link to post
Gez said:

The code in SLADE is basically an automated version of method #2 here.

Thanks for the link, but what exactly do the bytes mean? Is there anything in there storing tempo information or is that globally assumed by the engine?

Share this post


Link to post
Xaser said:

Thanks for the link, but what exactly do the bytes mean? Is there anything in there storing tempo information or is that globally assumed by the engine?


"41 44 4C 49 42 01 00 00 01" translates to ADLIB 01 00 00 01...

There is, at most, an indication of length, but nothing for tempo.

Share this post


Link to post

Hmm, that's what I was afraid of. Either ZDoom would have to support a different playback speed or I'd have to edit the file. The format seems simple enough that the latter might not be too hard to do, though.

Thanks anyhow.

Share this post


Link to post

Regarding Wolfenstein 3D midis that are out there - years ago I was also looking for the full midi soundtrack, but it turns out only about half or less of the soundtrack was ever made in midi format, which is a bummer, but DRO and IMF tools make it possible to get the rest in midi, so there's a bright side to it all.

Share this post


Link to post

What's even more stupid is that Wolfenstein 3D has never had and still hasn't support for Roland Sound Canvas or any such synthesizer. Even with Wolf4SDL, it still sounds like OPL. This denies any of the WW2-themed songs from sounding realistically like military fanfares, with 'French' horns and drums and such.

Share this post


Link to post
Xaser said:

Hmm, that's what I was afraid of. Either ZDoom would have to support a different playback speed or I'd have to edit the file. The format seems simple enough that the latter might not be too hard to do, though.

Thanks anyhow.

It's hardcoded at the moment (see line 18 in opl_mus_player.cpp). It might be possible to add a SNDINFO key to change the tempo for specific songs? Dunno if Randy would feel like implementing that.

Share this post


Link to post

I think it would be possible for a beatfinding program to "detect" the beat based on timing of the notes. I've seen it with programs that "fix" midi files with bad tempo information.

Share this post


Link to post
Mr. Chris said:

I didn't know you made such software Andrew, cool stuff. Tho when I try to output a song it is written as a 39 byte MIDI file.

I guess something went wrong, is the IMF file directly out of Wolf3D? My program doesn't handle the header that is added for ZDoom.

Share this post


Link to post
printz said:

What's even more stupid is that Wolfenstein 3D has never had and still hasn't support for Roland Sound Canvas or any such synthesizer. Even with Wolf4SDL, it still sounds like OPL.

Because the song format is just raw ADLIB (OPL2) data with some timing information -- there are no notes and no instrument names or numbers.

Share this post


Link to post
andrewj said:

My program doesn't handle the header that is added for ZDoom.

It's originally a header added for WolfMusic if I'm not mistaken, as this modified format is credited to Martin Fernandez. I guess Randy adopted it because the presence of that header makes it easy to identify the format, instead of going "it's a shapeless blob, let's hope it can be read as an IMF song".

In any case, checking for the presence of that header and skipping a few bytes ahead if found is not especially difficult. :)

Share this post


Link to post

If I felt like working on that again, then I'd also want to give it a decent GUI which allows users to change the guessed instruments, tweak a loudness factor of instruments, fiddle with the output tempo, and review such changes with a playback of the MIDI via fluidsynth or timidity. Don't hold your breath :-)

Share this post


Link to post
andrewj said:

I guess something went wrong, is the IMF file directly out of Wolf3D? My program doesn't handle the header that is added for ZDoom.


Yes, directly extracted out of AUDIO.WL6 using SLADE.

Share this post


Link to post
Mr. Chris said:

Yes, directly extracted out of AUDIO.WL6 using SLADE.

OK.

Please stick it in a zip and PM/email it to me and I'll try it here.

Share this post


Link to post

Cheers for the ZIP, Chris.

These IMF files have had a header added to them, I guess that's a feature of SLADE, but that's why my crusty old program doesn't work on them.

Share this post


Link to post

I looked in an older thread regarding SLADE and saw something about SLADE console using some command that added a header. Extracting without using the console command has allowed me to convert.

The songs came out fine except for a few songs playing a little faster than they normally do.

Share this post


Link to post

I've done all the Wolfenstein and Spear of destiny soundtracks in midi format.

Share this post


Link to post

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