Digital music comparison
There are three main categories of digital music: MIDIs, waves, and hybrids. To use a simile, MIDIs are like sheet music, waves are like tape recorders, and modules are a combination of the two. Each is discussed in detail below.
MIDI music is the equivalent of sheet music. It requires little processing power to play, and it takes up very little disk space. Because of this, MIDI-like formats were very common in early video games. A MIDI file contains all of the instructions for playing the notes and which instrument to use, but it can't determine how the instrument will sound. The actual sound of the instrument depends on the synthesizer playing back the MIDI file. If you have a very robust and expensive synthesizer, a MIDI file will sound better than the same MIDI file played on a cheaper synthesizer, just like a cheap piano won't sound as good as a very expensive piano. Also, while MIDI files can store which instrument is used to play each note, they don't have to. Many games use custom instruments that are loaded in memory before the MIDI file is played. This makes it much more difficult to play a MIDI file on another device and have it sound the same.
Wave files are the equivalent of tape recorders. They store digitally sampled audio data to sound very similar to whatever is recorded. The higher the sampling rate, the better the sound, the larger the file, and the more processing power it takes to play back. Because wave audio offers the most accurate playback, it is often reserved for sound effects and voice that can't easily be synthesized.
Because raw audio data takes up so much space, different forms of compression have been created to slim them down. Lossless compression uses pattern recognition and retains the quality of the sound, but only decreases the size of a file a little. Lossy compression uses uses analog methods which decrease the size a lot, but have a side-effect of losing quality.
Hybrid formats are the equivalent of having sheet music with a whole bunch of tape recorders to play back the notes. These formats work by taking short audio clips, called samples, and modulating them to get a desired effect, such as raising or lowering pitch. By doing this, you can make a wide variety of music with very few samples. For example, a single sample of a trumpet can be modulated and repeated to make an entire trumpet solo. Also, unlike MIDI playback, hybrid formats usually sound the same regardless of the device they're played on. Hybrid files are usually larger than MIDI files, but smaller than wave files, and their playback takes the most processing power.
Some hybrid formats use digital audio samples which will sound the same on all devices while other hybrid formats use instructional samples that target specific audio chips.
- Digital Samples: AMF, IT, MOD, OKT, PSM, PSM2, S3M, and XM.
- Instructional Samples: CMF, MDI, MUS (AdLib), ROL, S3M.
The previous formats were used by game developers to add music and sound to their games. However, the following formats were created by people to more easily extract and playback music from those games.
Logged formats store the instructions that are being sent directly to an audio chip either from a data stream or a memory snapshot. These logs can be resent to the audio chip or an emulator to play the music again. The downside of this format is that it is not possible to see the song in its original state, but only in a the state the audio chip is expecting to see it.
Custom formats are those that tend to include assembly programming for the specific chip on which they're meant to play. These formats are very difficult to make, extract, and play back. They usually require someone highly adept in the technical workings of the game platform as well as customized software to play.