If you have been playing games for long enough, you remember how the early consoles made sounds and music through the use of on-board synthesizer chips. Some systems, such as the NES, did have PCM playback support, but due to limited memory space and other technical considerations, it was virtually impossible to use for music.
In the last 20 years, most games have been using high quality music by mixing live recordings and rendered virtual instruments from DAWs (digital audio workstations).
DAWs are rich in all sorts of features and they use MIDI, a 30-year old protocol, to store and transport musical performances. Curiously, in the game space, MIDI is almost totally missing in today’s titles.
Although MIDI is essentially a transport protocol, it still carries a legacy of cheap sounding music that is not only the perception of the general public, but also among audio professionals. But, if MIDI sequenced music sounds cheesy, it’s generally the quality of the virtual instruments used that is to blame.
Technology has developed over the years, and in combination with content and the expertise of developers, high quality instruments are now possible. For a long time, this level of quality was only achievable offline within DAWs, but with the latest generation of platforms, it is now accessible for games.
Common interactive music scores today use a combination of switching, sequencing, layering and randomising techniques. Awesome music has been created this way, but it remains somewhat stiff, as the music is still pre-rendered. The next level of interactivity and variability is achievable by separating the musical notes (the performance) from the instrument. And that’s what MIDI is all about.
Using music notes to drive instruments extends the musical vocabulary in a way that will enhance the game experience. For example, the music’s tempo can be driven by game variables, in subtle or obvious ways to influence the player’s actions. You certainly remember the last 100 seconds of a Super Mario level where the music speed would accelerate to heighten the sense of urgency.
Music transitions are also approached differently with MIDI compared with audio-based music. No cross-fade or stitching is necessary. Instead, the music transitions naturally from the last played note of the source music to the next note in the destination music. Special logic is employed to determine how to kill or keep sustained notes and how to manage notes started before the sync point at destination.
From a high level perspective, using pre-defined note sequences are simply a first step in this field. Designing algorithms to generate music notes can introduce infinite variations without adding significant efforts.
This is referred to as algorithmic composition or generative music. Mathematical, grammar, knowledge-based or evolutionary models are interesting fields of research to compose music on the fly, and games is an ideal medium for it.
Detaching the music notes from the instrumentation also allows dynamic modifications of the instrument characteristics during playback. Attaching instruments ADSR segments to game variables or morphing instruments at runtime are a few examples of what can be done when the performance is separated from the instruments.
In the last generation of consoles, the memory and CPU resources have increased significantly, but the streaming capabilities didn’t follow the same curve. This scenario is not likely to change anytime soon and is another good reason to shift the way that games play music.
Most MIDI instruments are made from samples, by synthesis, or a combination of the two. Synthesis utilises the processor while eliminating streaming in most cases.
Sample-based instruments can use in-memory samples, while keeping the CPU usage low. Both models add real-time characteristics to instruments, including LFOs, envelopes, filters and effects, creating a rich musical environment.
WELCOME BACK MIDI
MIDI is ready for a comeback in games and we’ll support composers and game developers with tools for using MIDI in interactive music scores. Can games benefit from MIDI? Certainly.
Can MIDI completely replace pre-rendered music? Certainly not as the game contextually dictates which approach will yield better results; it is for the team to identify them and use the right tools for the job.