Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Porsche Monty

The original 16bit-22khz samples from iPhone Doom Classic

Recommended Posts

Here's an interesting quote from John Carmack on the Classic Doom iphone port he was working on: "To my surprise, Christian was able to dig up the original high quality source material for the Doom sounds, so we have 22khz 16 bit sound effects instead of the 11khz 8 bit ones from the original game. It turns out that I can barely tell the difference, which is a sign that we made good choices way back then about catering the sounds to the output device"

http://www.idsoftware.com/iphone-doom-classic-progress/

To me this is like hitting the jackpot. I always wondered if there were higher quality versions of the exact same samples that made it into the official Doom release. I'd definitely enjoy analyzing these samples and perhaps use them as a replacement for the originals.

Sure I've tried a couple of third-party "restoration" works and quite honestly...well, I'm not going any further into that.

Anyways, I'd want to know if these samples shipped with iPhone Doom Classic as suggested, and if so, are they stored in a regular wad file that can be handled with regular lump editors (or any other that would allow me to extract them to my PC)? I know next to nothing about mobile phones or any other stupid gadget people carry around these days, so before I buy anything, any advice would be much appreciated.

Share this post


Link to post
John Carmack said:

"...It turns out that I can barely tell the difference, which is a sign that we made good choices way back then about catering the sounds to the output device..."


Maybe the high end was rolled off, in preparation for conversion to 11k, which would explain why John could 'barely tell the difference.'

Porsche Monty said:

Sure I've tried a couple of third-party "restoration" works and quite honestly...well, I'm not going any further into that.


Perkristian's High-quality SFX is excellent. But, of course, 'original' originals would be awesome. Has anyone checked out the iPhone port?

Share this post


Link to post

These 22kHz Sounds are packed in a file called base.iPack within the doom1.0.ipa file. While ipa files are just zip archives, i have no clue how the stuff in this base.iPack file is stored.

Share this post


Link to post

Thanks heaps for the info. I had a friend buy it for me this morning. As for the .iPack file, I googled a bit and apparently it's some sort of nonstandard .riff container which you may be able to open with certain audio editors (every app that allegedly handled the format refused to open this one) So far I've managed only that, but the whole set of samples will play consecutively in a single stream, I can't choose to play them individually.

Guess this calls for a programmer?

Share this post


Link to post

Interesting. I'd have a look at the file, but I donlt have an iPhone.

Even if you could extract the sounds, I'm not sure you could distribute them freely though. It would be easier to ask Carmack or someone at Id if they can be made publicly available somehow.

Share this post


Link to post
exl said:

Even if you could extract the sounds, I'm not sure you could distribute them freely though


If I or anybody else managed that, I'm sure a tutorial would be posted, so the right thing to do for other people interested in these samples would be buying the game.

exl said:

It would be easier to ask Carmack or someone at Id if they can be made publicly available somehow.


Easier? for the love of God!

Share this post


Link to post
Csonicgo said:

They sound just like the sounds that came with the PC version


http://i51.tinypic.com/v3qayx.png

Not in my ears and not from a technical standpoint. Take DSBOSPIT.WAV for example, roughly the cyan-highlighted area in the spectrogram above (go compare it to a spectrogram of the original) The 22khz version sounds slightly cleaner, more natural, and thanks to the higher bit depth, it does not clip like the original does. The most significant improvements can be heard for the "tallest white bars" (effectively reaching up to approx 11khz) as there's twice the frequency resolution for representation.

If you've got a sound card that can output natively at 22khz and a professional monitor, the average quality increase could be conservatively estimated in the range of 25%, and totally worth it if you ask me.

Csonicgo said:

Peri Kristan's sounds are your best bet.


Must...not...reply...

Share this post


Link to post

^
Have you tried contacting John Carmack? He seems fairly approachable and he's certainly open to the Doom community. If you're really convinced the higher sounds quality is such an improvement I say you've nothing to lose... :)

Share this post


Link to post
Porsche Monty said:

Must...not...reply...


you must not reply because taking the digital samples from the sound ideas library and having a guy who nitpicks like crazy recreate them for the sounds that actually are recreateable isn't authentic enough?

Share this post


Link to post
Csonicgo said:

you must not reply because taking the digital samples from the sound ideas library and having a guy who nitpicks like crazy recreate them for the sounds that actually are recreateable isn't authentic enough?


I must not reply because people without standards tend to overreact. A nitpick would be taking something nearly perfect and point out an insignificant flaw. This, however, would be more like trying to spot microscopic traces of lipstick on a pig. Interesting concept, plausible research work but poor execution nonetheless.

Share this post


Link to post

Well, let's put black on white here: are they or are they not actually of higher quality than the in-game ones? Are they pre-filtered e.g. to 5 kHz audio bandwidth? Is the volume level different, since you mentioned absence of clipping? That sort of thing.

Share this post


Link to post
Maes said:

Well, let's put black on white here: are they or are they not actually of higher quality than the in-game ones? Are they pre-filtered e.g. to 5 kHz audio bandwidth? Is the volume level different, since you mentioned absence of clipping? That sort of thing.


Look at the picture I posted, that's the whole stream, all the sounds combined. Those samples vertically reaching past the mid section on the graphic are indeed not pre-filtered to 5khz. It's a mixed bag I guess, and nope, no compromises on the db department.

It's clear improvement in my opinion. Whether you would be able to appreciate the differences or not, that I ignore, but I'd say Carmack speaks for the average player.

Share this post


Link to post
Porsche Monty said:

As for the .iPack file, I googled a bit and apparently it's some sort of nonstandard .riff container which you may be able to open with certain audio editors (every app that allegedly handled the format refused to open this one)

Links please? I'm not having any luck Google-searching iPack or whatever. Too many spam results selling iPod/Pad/Phone backpacks and other useless crap.

I have however had a bit of luck analyzing a hexdump of base.iPack and here's what I've figured out so far:

base.iPack contains both images (used for menus and stuff) and sounds. At the beginning of base.iPack is a header, thus:

000000:  02003412  version number?
000004:  c0886300  directory offset
000008:  2f000000  number of images (47)
00000c:  ac000000  some other number?
000010:  05000000  some other number?
The directory consists of a number of image-file entries and a number of sound-file entries. Each image entry is 164 bytes and the first one is at 0x6388c0 as shown above (little-endian, remember):
d5904881  ..H.
ffffffff  ....
6970686f6e652f617269616c696d6167656c616c2e7467610000000000000000
0000000000000000000000000000000000000000000000000000000000000000
        iphone/arialimagelal.tga........................................
300c0000  0...
04000000  ....
00010000  ....
00010000  ....
09000000  ....
01290000  .)..
01290000  .)..
01270000  .'..
01260000  .&..
01000000  ....
00010000  ....
00010000  ....
0000803f  ...?
0000803f  ...?
00000000  ....
00000000  ....
00000000  ....
00000000  ....
00000000  ....
00000000  ....
00000000  ....
00000000  ....
00000000  ....
Lots of fields I haven't bothered figuring out since I don't care. Maybe some other brave soul can step in. :)

The first sound file entry is at 0x63a6dc, and each one is 92 bytes. There are new menu sounds (filenames start with "iphone/") as well as the Doom sounds (filenames start with "newsfx/"). Here's the first one:
67294d51  g)MQ
ffffffff  ....  ? almost always ffffffff
6970686f6e652f6261626f727465645f30312e77617600000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
        iphone/baborted_01.wav..........................................
e0b60200  ....  offset to beginning of sound data
01000000  ....  number of channels
02000000  ....  number of bytes/sample
22560000  "V..  sample rate (0x5622 = 22050)
b10e0000  ....  number of samples (i.e., half number of bytes)
With that in mind I was able to write an exceptionally crude C program that extracts the Doom sounds from base.iPack. After some sox-wrangling I'm now ready to distribute the sounds in WAV format, with a couple of warnings:

- Most of the sounds have clicks or other glitches (a sample or two) at their ends. Maybe I don't have the file format quite down pat yet. I have elected to leave them in since I don't see any consistent pattern and I don't want to have to make judgment calls on where to cut that others might disagree with.

- dsbdopn and dsbdcls are screwed up for some reason, like their sample rates are much, MUCH lower than the rest (lower than 11025 Hz even). I haven't a clue what the problem is, although since they're basically sped-up versions of dsdoropn and dsdorcls, they'd be easy to recreate: use one of those filters that speeds up sound without changing the pitch, and speed them up to about 3x original speed.

With those caveats in mind, use in all good health.

Share this post


Link to post
Porsche Monty said:

I must not reply because people without standards tend to overreact. A nitpick would be taking something nearly perfect and point out an insignificant flaw. This, however, would be more like trying to spot microscopic traces of lipstick on a pig. Interesting concept, plausible research work but poor execution nonetheless.


Hey I hear monster cables really make my sound awesome also have you tried using wooden volume knobs instead of the plastic ones because they give the sound "warmth".

Share this post


Link to post
Guest
This topic is now closed to further replies.
×