MIDI Tracks from Classic Mac OS Games

MIDI Tracks from Classic Mac OS Games

In the classic Mac operating system, files could have two forks, a conventional data fork, and a resource fork. The resource fork was sort of like a file system embedded within the file, with types and individual objects. It was an excellent way of storing structured data within files and applications.

Some of the Resources in the Lemmings “Music” file

One of these data types sometimes embedded into files was the music for computer games, such as Prince of Persia and Lemmings. These games used a sample based MIDI player to provide their music. As a kid, I noticed that these songs were stored as a resource type “MIDI”… moreover, if you *cough*, crudely pasted the content of these individual MIDI resources into the data fork of an empty file and typed it correctly as a MIDI file… they played in Cubase on our Yamaha TG 100.

While I’ve lost the original files I extracted years ago, I thought I’d re-extract them and make them available in case anybody is interested.

Note that these are the raw MIDI files, and in-situ, they were alongside INST and SONG resources which described which sample based instruments should be used for which individual tracks, as well as some tempo and maximum note length data. Additionally, some of the samples are percussion, and might not even be tuned to the same pitch (although this should be corrected in the “INST” resource, so I doubt it will be an issue in practice). This has a greater impact on the Lemmings songs, which seem to contain no instrument data themselves, while it seems that the Prince of Persia songs do at least try to select sensible instruments.

Downloads

The MIDI files here are straight from the games and so are sometimes a little weird – like include hanging notes instead of pauses, because game settings mean that sounds decay quickly. The sound samples are all the sounds stored as resources from the games, such as sound effects and instrument samples. I’ve provided them as both WAV files and in ResEdit Resource files. The latter wont work on linux or PCs and will be likely corrupted if you extract them from their .sit.hqx wrapper – this said, there isn’t anything you need in there that isn’t available as a WAV file elsewhere in the download.

Prince of Persia

MIDI Files – https://elephantandchicken.co.uk/downloads/GameMusic/PoP_Music.zip

Sound Samples – https://elephantandchicken.co.uk/downloads/GameMusic/PoPSounds.zip

Lemmings

MIDI Files – https://elephantandchicken.co.uk/downloads/GameMusic/LemmingsMusic.zip

Sound Samples – https://elephantandchicken.co.uk/downloads/GameMusic/LemmingsSounds.zip

Oh No More Lemmings!

MIDI Files – https://elephantandchicken.co.uk/downloads/GameMusic/ONMLMusic.zip

Sound Samples – https://elephantandchicken.co.uk/downloads/GameMusic/ONMLSounds.zip

Additional Thoughts

Prince of Persia 2

I looked at extracting the songs from Prince of Persia 2 as well, but need to spend a little more time understanding how they’re formatted as they appear to have concatenated all the songs together in a small number of files and individual songs don’t appear to be terminated in the usual way? I’m not sure what exactly is going on, but it can’t be too complicated as MIDI itself is just a stream of commands to be interpreted.

Editing the Songs

It feels like it might be a fun and simple project to swap in some alternative MIDI songs and sound samples into a game. Other than a small amount of fiddling to set up instruments, it should be pretty much just a copy/paste job to swap different music into Lemmings enabling perhaps a custom version with your favourite instrumental tracks instead of the default music. With Lemmings this is especially easy since the music is stored in a separate file.