Skip to content
SalsaGal edited this page May 7, 2024 · 6 revisions

UnLoKable is a set of tools that can parse and extract instruments, music sequences and audio streams from a collection of Crystal Dynamics' proprietary formats (.SND, .SMP, .MUS, .SAM and .MUL). The .SND/.SMP format can be found in Crystal Dynamics games released between 1996 and 2000 while the .MUS/.SAM format was used in games released between 2000 and 2007. .MUL instead appears in games released between 2003 and 2007.

Examples of games that use these formats include:

  • Gex 3D
  • Akuji the Heartless
  • Legacy of Kain games (Soul Reaver 1 & 2 and Defiance)
  • Walt Disney World Quest: Magical Racing Tour

Be sure to familiarise yourself with the definitions before continuing.

Format Summary

.SND and .SMP can mostly be found in Crystal Dynamics PlayStation games and their structure is conceptually very similar to .VH/.VB/.VAB/.SEQ/.SEP files (the default formats for PlayStation soundbanks and sequences). The key differences are that they're much more space-efficient compared to regular .VAB/.SEQ and that they're tailored specifically to work with Crystal Dynamics' audio engine. The .SND contains the following information: programs/instruments, zones/tones, pitch finetunings, ADSR curves (in PlayStation's SPU format), keyboard regions and much more... It also contains the actual music sequences. The .SMP instead simply contains the raw audio data for the samples that get used as instruments. The raw audio data format can vary depending on the game version and for which console it was developed for. On the PlayStation it uses the VAG format (a form of 4-bit ADPCM developed by Sony) and on the Dreamcast it uses a proprietary container that stores PCM audio data.

The music sequences use a version of the MIDI standard that has been heavily modified and customized by Crystal Dynamics developers. Each music sequence can either have the "QSMa" or the "QESa" header. If it has a "QESa" header, it means it is a simple sequence with a single track. In MIDI terms it resembles an SMF0 or a "Type 0" sequence where all channel information is stored in one track. If the header instead is "QSMa" then it's a collection of tracks and there can be a maximum of 16. This resembles a SMF1 or "Type 1" sequence, where each channel is stored in their respective track. All the tracks get played in parallel and each one can be dynamically muted or unmuted.

.MUS and .SAM use a very similar overall structure compared to .SND and .SMP. The variables and attributes are stored differently and many of them are in a different format, but the overall principle is the same. .MUS for instruments, zones, ADSR curves, sequences, etc. and .SAM for raw sample data. These can be found in PlayStation 2, XBox and PC games.

.MUL instead stands for "Multiplexed Stream". It's a format whose data is interleaved, meaning the type of content keeps switching as you scroll through the file. The chunks can have an arbitrary non-fixed size. Generally speaking the content that can be found in .MUL files is real-time cinematic sequences and streamed multichannel audio.

The end goal is to parse and convert these formats into more popular and standard formats, like standard MIDI files (.MID), PlayStation sequences (.SEQ), SoundFonts (.SF2), Downloadable Sounds (.DLS), PlayStation VAG banks (.VAB) and streamed audio (.WAV, .FLAC, .MP3, .OGG, etc.). However the tools are only capable of doing parsing, simple conversion and extraction, so the remaining steps can be achieved with other tools, like VGMTrans, LoopingAudioConverter, foobar2000, SF2Comp and many many others.

Clone this wiki locally