Help identifying music format used in classic Mac OS games Until QuickTime Musical Instruments came along, classic Mac OS didn't have much support for MIDI. So many games would pack the MIDI data and samples into resources in the resource fork of the application. They then interpreted the MIDI data and mixed the samples together at different pitches to make music. There was a developer who released a library that made this all possible. Some games that used this library were:


SimCity 2000
Lemmings
Wolfenstein 3D


Some of the instrument samples were saved as SND resources while others were in a proprietary format (to the library) and were LZW compressed if I recall correctly. 20 years ago, as a hobby, I used to rip the MIDI data out of the resource fork along with the sample data. Then I would put both through a MIDI software sampler and record the resulting music.

However, I can't seem to recall the name of the library the games used or the developer who wrote it. Using this description of the library, can someone recall and tell me the name of it and the developer? For some reason, "csnd" rings a bell, but that hasn't turned up anything on Google.

I'm also pretty sure a shareware version of the library was on the CD in the back of a book entitled Tricks of the Mac Game Programming Gurus. I've since gotten rid of the book.
I did some research and reverse-engineering on this recently. The library was called SoundMusicSys, and there's now an open-source version of it called miniBAE (Beatnik Audio Engine) which appears to be mostly based on the original code.

It turns out that csnd resources are just normal snd resources that were LZSS compressed and delta-encoded in a few different ways depending on whether they're mono/stereo or 8/16-bit. cmid resources (compressed MIDI) are just LZSS compressed and not delta-encoded. There also appear to be esnd (encrypted snd) and emid (encrypted MIDI) resources, but I couldn't find any examples of these to reverse-engineer. SoundMusicSys used a few other resource types to link the snd/csnd and MIDIs together; the most relevant of these are SONG and INST, which define the instruments and parameters for each tune.

I wrote a disassembler for classic Mac OS resource forks a while ago, and recently added support for extracting csnd/cmid, INST, and SONG resources in addition to all the normal stuff (snd, MIDI, etc.). Might be useful in playing around with these classic games' content.