Gary L. Simmons  rev 08/19/03
Home  Marathon  Joke OT Weak  Web Building  Resumé  Lynx  Hobbies  Extra  Site Map Links Page Extra Go to next department

The Battle Cat's Litterbox

Anvil Tips | HAS Tutorials | Edit Notes | Sounds & Music | Images File | Tools | Nonstandard Colors | Control Modifications | HUD Modifications | Prefs Modifications | PICT Notes | Engine Hacking | Documentation | Bandwidth Saving | Unused Sounds | Hakvil | Shapes 1 | Shapes 2 | Color Clippings | Custom Icons | Clut Notes

Sounds and Music

If you fly into a seething purple rage when you see me announce an Anvil tutorial then you had better have Nurse Ratchet strap you to a table and start the thorazine pump cause there is going to be a butt load of HAS tutorials in the Anvil Tips department. Yes, Hamish Sanderson has more of these things than Carter has little pill bugs in his garden. Today he writes about sounds in Marathon. Yes there will be a quiz and anybody with a score below 85 will be shot. Sorry, no stragglers allowed, the load in Hamishes kilt is all the dead weight we can afford during the heavy fighting and the incursions in the bloody Lh'owon campaign. - gls

(Editor's Note: For more information about sounds see EditNotes and Unused Sound Slots. - gls 10/09/2000)


The following editors are generally available:

Anvil 1.0.3
Sound Editor (currently at 1.0b6) [by Charles Lechasseur]
Wail 2.2b2 [by Charles Lechasseur] is the successor to Sound Editor (Editors Note: Wail was released after this writeup was produced. For comments by HAS on Wail and other tools, please refer to the Useful Tools and Utilities page - gls 09/30/2000)

If you use Anvil, 1.0.3 is the version recommended. Back date it with the Anvil Backdater to the most bug free version.

(There is also a more basic tool called Noise [by Bo Lindbergh], which may or may not be generally available - it exports the contents of a Sounds file to ResEdit+SimpleText files and back again. Given the presence of full-fledged editors, however, it's unlikely you'd find Noise particularly useful for day-to-day work. It is perhaps worth being aware of its existence though.) (Editor's Note: I recently contacted Bo Lindbergh in reguard to releasing his program "Marathon Noise" for download. Bo's response was, "Nope. It's a batch export/import tool; it's user hostile and too ugly to release." I am leaving all references to Noise in these documents for the purpose of historical accuracy however, be advised Noise is not available for download unless you have a copy, including README, you want to send me. However even with that program available, your best bet would be to make sound changes using Wail or Chisel - gls 10/8/2000)

Sound Editor (read Wail) is better featured than Anvil (it's definitely my preferred choice). Most of the advanced stuff described in this section can't be done with Anvil, so is best done with SE. On top of the usual importing/exporting stuff it also allows:

  • Sounds to be deleted (Anvil cannot do this; it's very useful though)
  • Creation of standalone Sound Shuttles; Shuttles can also be generated by comparing a modified file against an original (select original file first, then select modified file); Shuttles can be freely edited in SE too.
  • Stripping of 16-bit slots [SE refers to them as 'classes', but I'll call them slots from hereon, preferring to think of a 'class' as being both the 8-bit slot and the 16-bit slot] from a Sounds file (this cuts the size of the Marathon Infinity Sounds file by 2/3, for example, at the expense of the 16-bit Sounds option; however, see later for more notes on this topic). There's even an option to strip 8-bit slots, although I've yet to think of any use to this.
  • Slot IDs to be edited (see later for why this is useful).

SE also has a few other little enhancements that can help make life a bit easier compared to Anvil; refer to the SE readme for more details.

If you decide to use SE, there is one very important point that _must_ be observed. Once a Sounds file has been edited in SE, you must never edit and save it using Anvil. Because SE allows you to delete sounds and make other changes that Anvil can't, an SE-modified Sounds file may become corrupted if edited and saved in Anvil (Anvil can't cope with the SE-made changes and saves the file incorrectly). A Sounds file corrupted by Anvil this way will fail to play some sounds; the damaged sounds will need replaced if this happens, so it's something to be avoided.

With regard to getting SE running as smoothly as possible, I'd recommend you check both options in the Sound Clipboard preferences. SE uses an internal clipboard which allows you to copy and paste groups of sounds between slots; you'll almost certainly find it easier to work with SE if you tell it to automatically convert to/from the internal clipboard and the Mac clipboard when moving between applications (these options aren't on by default). Also, you may wish to modify some of the general Editor preferences too, e.g. turn off 'Confirm before deleting sound' and, depending on usage, turn on 'Allow empty sound classes' & '[Allow] class ID modification'. In any case, it's worth reading through the SE documentation (which is very thorough) and poking around in SE itself to see just what it can do.

Note that SE writes temp files quite a bit. If SE encounters a problem whilst saving and quits, a temp file may get left behind. This can cause problems when subsequently running SE, so if this happens delete any SE temp files you may find after SE quits (they're easy to recognize by their weird file names, e.g. '29yt8s02sound.e.*this').

One other note about SE (and about the only [albeit fairly minor] advantage Anvil has over it) - the Marathon Infinity Sounds file sometimes 'cheats' when it comes to the contents of 16-bit slots, and instead of containing 16-bit sounds it refers the Marathon Infinity engine to the 8-bit slot instead to use the sound(s) there. Anvil handles these 'references' without problems and will preserve them where they already exist - although since Anvil doesn't allow you to remove sounds from slots you can't create such references yourself, which makes the feature pretty useless as far as Sounds editing goes. SE, however, will duplicate the contents of the 8-bit slot into the 16-bit one on saving. In practice, this isn't such a big loss as it sounds, as the standard Marathon Infinity file already contains 16-bit sounds in the vast majority of 16-bit slots, meaning that the saving gained through using references in the first place is actually very small (approximately 500KB out of a file that's already 17.5MB). Whilst it'd be nice if SE supported 'references' itself (where they'd actually be of a lot of use to Sounds editors), I don't consider this to be something worth losing sleep over and would still recommend SE over Anvil any day.

Sounds Slots Settings

Sounds dialog boxThis is a quick reference section regarding the various options that can be applied to each slot (note that 8-bit and 16-bit slots in a class each have their own set of check boxes, etc). There is some confusion over what all the options actually do (I'm afraid I'm not 100% clear on them myself), so this is probably the closest to a definitive guide as you'll get.

 The 8-bit and 16-bit radio buttons should be obvious enough - just remember that, as with Weapons-in-Hand and Landscape collections in the Shapes file, if you replace the contents of one, don't forget to change the other too!

There are 6 check boxes available (5 in SE; one box is grayed out):

Cannot be restarted
I think the point of this one is to prevent a sound being interrupted by another sound from the same slot being played before it has stopped. In the Marathon Infinity Sounds, it's checked for Bob voices (presumably so that a bob phrase doesn't get cut-off mid-way). Hum...

Resists pitch changes
According to the SE Readme: "this flag doesn't exist. Anvil lists it and even checks it for some classes, but it's non-existent in the Sound File itself. I have no idea how Anvil comes up with it. Experience has told me that Anvil's sound-editing capabilities are somewhat limited, to say the least. This is always grayed-out."
Draw your own conclusions.

Can't change pitch
The Marathon Infinity PM allows you to adjust the pitch [playback speed] of monster sounds; this setting applies to all the sounds a particular monster can make. This flag should prevent a specific sound from being affected by the PM setting.

Can't be obstructed/ Can't be media obstructed
Sounds can be partially or completely blocked by solid walls, closed doors, liquid boundaries, etc. Presumably these flags prevent that behavior, allowing the sound to radiate to its natural limits.

Is Ambient
If checked, this slot won't be used if the 'Ambient Sounds' check box is unchecked in the Marathon Infinity preferences. That's about all it does. (Note that unchecking this still won't make ambient sounds play in Marathon Infinity when 'Ambient Sounds' are off - I assume Marathon Infinity itself ignores the entire ambient sounds routine in this situation.)

The 'Volume' menu
This one also causes plenty of confusion. The 'Volume' title (with its settings of soft/medium/loud) seems to be something of a misnomer. What it _doesn't_ do is alter the playback volume of a sound (which is what most folks, not unreasonably, assume, given the name). In fact, what it actually seems to alter is penetration depth of sounds (i.e. the extent they can pass through solid walls, closed doors, etc.). Medium is the default setting for most sounds. Loud sounds penetrate fully to their natural limits regardless of obstacles, whereas Soft sounds are completely blocked by obstacles (essentially, if you don't have a clear straight-line route between player and sound source, you won't hear it at all).

In SE, there is also the 'Class ID' shown in the bottom-left corner of the editing window. If the 'Allow ID modification' is on in the preferences, clicking on this (it's not obvious) will bring up a dialogue to alter this value.

A brief note about 8-bit and 16-bit slots

There are a couple things worth knowing about 8-bit and 16-bit slots and how Marathon Infinity handles these.

First, they don't actually need to contain 8-bit or 16-bit sounds respectively. You can put 16-bit sounds in 8-bit slots, and vice-versa, and Marathon Infinity won't care; all it does is fire sounds straight to the Mac's Sound Manager (which doesn't care either - it just plays what it's sent). The only reason (that I can be sure of) why Bungie used the 2 different sound formats is that non-AV 68xxx Macs can't play 16-bit sounds (all AV and PowerMacs can). Actually, it might also be that using 16-bit sounds increases memory requirements (for Marathon Infinity and/or OS) - if this was the case then 8-bit sounds would also be an advantage for low-memory Macs - but this is something I really don't know (maybe someone else could enlighten me?).

Also, the sample rate of sounds doesn't need to be anything specific, although I'd recommend sticking to 22KHz or thereabouts for the best quality vs. size. 44KHz (CD quality) really isn't worth the hike in size, and 11KHz usually sounds crap. If you're grabbing sounds from other sources then it's worth downsampling them to 22KHz if the originals are sampled higher than that (there's no advantage to be had in _upsampling_ any sound, BTW - if it's lower than 22KHz, leave it as-is). Oh yeah, just as you can downsample frequency, you can also reduce bit-depth from 16 to 8 (again, this reduces file size; note that increasing bit-depth is also another worthless exercise, BTW). As always, this sort of optimization is well worth doing if you're going to distribute on-line (downsampling 16-bit sounds to 8-bit will also ensure non-AV 68K Mac-compatibility, if you're concerned about such things).

It's worth bearing in mind that you can use any sound in any slot; for example, if you want to distribute a Sounds patch that replaces the contents of both 8-bit and 16-bit slots (for compatibility) but remains relatively compact, you may choose to use the same 8-bit sound in both slots (thus cutting patch size by 1/3).

There's also another possibility that takes advantage of this flexibility, which is to use 16-bit, IMA-compressed sounds _only_ in your Sounds file. This will be covered fully in the 'Reducing File Size' section, and it's really one of those gems of Mara-editing that is well worth knowing about.

Notes on deleting sounds (see also '(re)Activating unused sound slots')

Note that if you delete all sounds from a slot, and the Marathon Infinity engine then tries to call that slot, then Marathon Infinity will crash. Moral: never delete all sounds from a slot ­ if you do wish to remove all sounds then it may be wisest to insert at least a very short blank sound so that the slot remains occupied. Except: it _is_ safe to remove all sounds from a slot if you set the slot's ID to 1 ­ that way the Marathon Infinity engine knows it is an empty slot and won't try to load non-existent sounds from it. This might be worth doing if you know you'll never be using this slot, although if you then want to reactivate it later then you will have to re-enter a suitable ID for the Marathon Infinity engine to be able to see it again. Personally, I prefer to insert a short blank sound into any 'unused' slots rather than disable them, working on the assumption that sooner or later I probably will want to use them again...

As always, remember to apply changes to both the 8-bit _and_ the 16-bit versions, otherwise you'll get some embarrassing results.

One other thing: Shuttles don't seem able to patch over occupied collections with empty ones - i.e. the shuttle can have an empty slot with its Class set to -1 all right, but this won't for some reason be applied to the file being patched. However, empty slots are only likely to be of interest to TC folks anyway (who want to ship an entire Sounds file in its most efficient form), so this isn't that much of a loss really. If you do wish to do the end-user a favor by getting rid of unused sounds from his patched Sounds file (thus making the file smaller which, if nothing else, might be considered polite), then paste in short blank samples so that slots are occupied (but with very small sounds, which will take up much less space). BTW, this also applies when you are creating a shuttle from a stripped Sounds file (one that has had all the 16-bit sounds stripped out by SE) - again, the 16-bit sounds in the patched Sounds file will be left intact.

(re)Activating unused sound slots

(Editor's Note: This section now has an entire page devoted to it. Please see Unused Sound Slots. - gls 10/08/2000)

Exceeding the 215 (Marathon Infinity) sounds limit

This is one of those rather advanced concepts that a few folk are currently working with, although most folks would probably be best advised not to give it too much attention. I mention it simply so that folks know the possibility exists.

I suspect that Bo Lindbergh's "Marathon Noise" (an Marathon 2/Marathon Infinity sound editing app that works by splitting the sounds file into raw resources that you can then edit via ResEdit and SimpleText), would be one possible way to exceed the 215 sounds limit (although you'd then be unable to use Anvil/SE for further editing, of course). [There is an alternative to SE that can work with any length of Sounds file called 'Wail' that has been in development for some time, but I have no idea if/when it'll go public.]

BTW, changing the number of slots in a Sounds file requires patching the Marathon app too, although this can now be done easily thanks to Fux.

Creating a Sounds file with >215 sounds in it wouldn't normally be considered of any use, since the Shapes and PM editors in Anvil use fixed-length pull-down menus that can't be altered to include additional sounds. However with the release of Mike Trinder's Ambience effect for Chisel (it allows you to expand the number of ambient sounds you can use in a scenario), this possibility starts to look like it might be useful (since it _does_ allow Marathon Infinity to access slots over the 215 limit). That said, I'd only ever suggest this as a possibility for really competent TC-builders who absolutely can't manage within the standard 215 slots. Anyone else would be strongly advised to stick with the existing 215 slots ­ re-enabling the 20 or so that are currently unused, if necessary ­ and live a longer and less stressful life as a result. And there's plenty that could be done with Ambience just by utilizing those unused slots <hint>:).

Reducing File Size

Note that the standard Marathon Infinity Sounds file is over 17MB in size. Note also that sounds don't tend to compress very well when Stuffed, so you'll get little or no saving over their original size when you come to distribute on-line. Thus, it's well worth investigating ways of reducing file size when putting a new Sounds file (or patch) together. (BTW, as always, keep a backup copy of the original safe in case you need to go back to it later.)

  1. Distribute '8-bit only' patches (if you're distributing changes to the existing Sounds file)
    You'll need to include a note with your patcher to remind folks not to play with the '16-bit sounds' option checked. (If you distribute an engine patch also, and your modified engine has a unique Preferences filename, then you might want to 'remove' this check box from the Marathon Infinity Preferences just to be sure. See the notes on Engine Hacking for details.) This way, your patch is only 1/3 the size of one that contains both 8-bit and 16-bit replacement sounds. You can cut this down even further by using 16-bit IMA-compressed sounds instead of the usual 8-bit ones, but see the note below on IMA-compression first.

    A variation on this approach, incidentally, would be to ship a patcher that has replacement sounds in the relevant 8-bit slots, and short silent 'blank' sounds in all the 16-bit slots. i.e. If your scenario is restricted to using 8-bit sounds only, then do the player the favor of removing all those 'unusable' 16-bit sounds from their modified Sounds file for them, and save them about 10MB of hard disk space. (It's just a pity that Sounds Editor shuttles don't have an automatic 'strip' facility built in - maybe the next version...?:)
  2. Distribute patches that patch both 8-bit and 16-bit slots, but use 8-bit sounds in both slots. That still saves you a bit compared to a patch with 16-bit sounds in the 16-bit slots. A more efficient option would be 3. below, however.
  3. Distribute patches that patch both 8-bit and 16-bit slots, with 8-bit sounds in the 8-bit slots, and 16-bit IMA-compressed sounds in the 16-bit slots. This may be the best of all worlds - you'll retain compatibility for the old non-AV 040 Macs via the 8-bit slots, and keep the patch size down due to the use of IMA-compressed sounds in the 16-bit slots. (If you're not worried about compatibility with old Macs, then consider using the IMA-compressed sounds in all slots for maximum reduction in size.)

If you're distributing a complete replacement Sounds file, then again you have a choice of methods of putting it together. My own preference is to assemble a Sounds file that contains 16-bit IMA-compressed sounds in the 8-bit slots, strip the contents of the 16-bit slots completely, and ship the file along with a patch for the application to disable the '16-bit sounds' check box once and for all (see the 'Engine Hacking' section). If you do the maths, then had the original 17.5MB Marathon Infinity Sounds file been created this way, it would have weighed in at a mere 3MB or so! Of course, such a Sounds file would be unuseable on some 040 Macs, so I'd probably consider releasing a version with 8-bit sounds separately if I thought there'd be a demand.

As you can see, there's various ways of putting together patches and Sounds files that give you various levels of compatibility and reduction in file size. If you wish to be radical (and be as compact as possible) then shipping files/patches that contain IMA-compressed sounds in the 8-bit slots only is the way to go. I'd suggest more conservative folks ship files/patches with 8-bit sounds in the 8-bit slots, and 16-bit IMA-compressed ones in the 16-bit slots. My own preference would be to use the 'radical method' for complete Sounds files, and the 'conservative method' on patches.

Note that there really is no reason for shipping files that have uncompressed 16-bit sounds in them at all. The only thing this achieves is to bloat file sizes and increase download times (and honk off folks like me who pay for phone calls by-the-minute).

Notes on IMA compression

This form of compression works only for 16-bit sounds (any frequency), and gives 4:1 compression with virtually no loss of quality. If there's any performance hit due to the OS's Sound Manager having to do more work playing these, I've not noticed. Though there are other compression types available, the newer ones (i.e. those that come with QuickTime 3 or greater) won't work with Marathon, and the others all affect quality significantly. Therefore, I'd only recommend IMA compression, but it's a strong recommendation - it can have a major (positive) impact on file sizes when you come to distribute over the internet. You can use it both on Music files (which are AIFF files with modified file type/creator codes), and on the sounds used in the Sounds file. If you wish, you can replace all MI's sounds with 16-bit IMA-compressed versions and save a ton of disk space as a result (though I'd not recommend reworking existing Marathon Infinity sounds into IMA-compressed form simply for the sake of it!;). Bear in mind, however, that because some 040 Macs don't support 16-bit sound playback, sounds which use IMA-compression also can't be played on these Macs due to their being 16-bit. You'll need to decide for yourself as to how best to cater to any such folks (if at all).

Converting any sound to 16-bit IMA-compressed form is dead easy. Personally, I run sounds through MoviePlayer to convert them (as I don't have any pro sound-editing tools) and this works just fine - open them with MoviePlayer, then export as sys7 sound with Options 16-bit, IMA, 22.05/22.2, and re-import into the 8 bit slots of your stripped file. (BTW, 44KHZ is a _total_ waste of time for Marathon, it makes for a huge download, and unless you have a good stereo connected you won't even notice any difference!).

[Note that if you use the free version of QuickTime 3-or-greater then you can still access the required features by using the version of MoviePlayer that shipped with QuickTime 2.5 - unlike the QuickTime 3+ versions it isn't crippled.]

All this stuff also applies to chapter sounds in Map file. So don't forget to do those too.

Also in your sounds file: use Sound Editor to remove any/some/all additional sounds from slots that contain more than one. Your file will still function just fine - you won't get such varied audio, that's all. It's a tradeoff. And definitely check for duplicates - in some projects I've seen the BOB sound slots, most of which contain several different BOB sounds, contain a single new sound duplicated to replace each of the BOB ones. In Anvil you have to do this [no delete] but in Sound Editor you don't.


The Music file is a dirt-simple beast. It's what plays at the splash screen/main controls screen when you start Marathon Infinity up.

It's a standard AIFF sound file with a modified file type ('mus2' instead of 'AIFF'). It can be any bit-depth (8-bit/16-bit) and frequency you like (e.g. 11/22.2/44.1KHz). It can also use some (but not all) types of compression, although the only one I'd recommend considering is IMA (which works on 16-bit sounds); see the notes on IMA-compressed sounds (above) ­ and the notes on 8-bit/16-bit sounds in general.

Anvil Tips | HAS Tutorials | Edit Notes | Sounds & Music | Images File | Tools | Nonstandard Colors | Control Modifications | HUD Modifications | Prefs Modifications | PICT Notes | Engine Hacking | Documentation | Bandwidth Saving | Unused Sounds | Hakvil | Shapes 1 | Shapes 2 | Color Clippings | Custom Icons | Clut Notes

Top of Page

Back to the Litterbox