It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Guy Whitmore
[Author's Bio]
Gamasutra
May 29, 2003

Introduction

Timing and Synchronizing Music Cues.

Printer Friendly Version


Resource Guide

Design With Music In Mind: A Guide to Adaptive Audio for Game Designers


Mark of Kri

Timing and synchronizing music cues. If your music design calls for music cues to be layered or sequential, the timing of the performances may be critical. Having the ability to start a cue on a specific rhythmic boundary of the underlying music will help the score sound musically coherent. Various cues can then be made part of a single piece of music rather than having disparate cues randomly collide with each other.

Transitions between cues. Moving smoothly from one musical cue to another in a nonlinear game environment is tricky, but necessary to maintain the thread of gameplay. Transitions are the glue that add continuity to a game score, and hence to the game itself.

The timing and syncing issues just described apply here as well. Highly adaptive scores use a variety of different transition types depending on the specific scenario of the game. A transition could be silence between cues (one cue ends then the next begins), a cross-fade between cues, a direct splice between cues, a synched overlapping cue, or seamless transition music between cues. Games that are limited to the first two transition types will likely end up with a disjointed score, because the game is constantly fading music in and out; musical momentum is never maintained. A game score that uses exclusively linear music files with cross-fades is analogous to a modern game using Myst's (1993) visual technology! The result is a musical slide show. Cross fades have their place, but other options are available to bridge the gap between primary music cues.

But creating seamless transitions between cues is no easy feat compositionally or technically, because the timing of a transition isn't known until run-time. So the music (and the music system) must be prepared to transition to the next cue at any moment, and it music do so in a musically satisfying manor. This is why transition boundaries and timing are so crucial.

Techniques for achieving seamless transitions include the following:

  • Cue-to-cue transitions on musical boundaries: In this system, when a new cue is called, the current cue plays until the next "boundary" (perhaps the next measure), and then a new cue begins. The advantage to this is simplicity, but this approach is limited musically and can sound sudden, or stilted. Although this can work well in specific circumstances.
  • Layering: This approach adds and subtracts musical instrument layers to seamlessly build and diminish the score. Continuity is the advantage layering offers because some instruments continue playing as others are added or subtracted. The disadvantage is that it's difficult to move quickly to a completely different cue.
  • Transition matrix: creating a transition matrix enables the game to select an appropriate transition between any pair of music cues. This allows custom transitions to be created for specific situations, and can result in dramatic, yet natural, sounding motion from cue to cue. The challenge here lies with the composer, because composing and producing the various transitions forces that person to think about their music in a completely non-linear manner.

These approaches to music transitions are just some of the possibilities, and many more will be tried in years to come. Transition techniques can be combined and applied to MIDI and/or Wave data. Musical style and direction will dictate which approach will work best for your game -- layering may work well for a techno score since that is often the approach DJs use to create their music, while a transition matrix works well for an orchestral score, allowing for sweeping, dramatic transitions)


Ambush.mp3 Timeline
From the PC game: No One Lives Forever
Developer: Monolith Productions
Publisher: Fox Interactive
Music and Arranging by Guy Whitmore and Tobin Buttram

This music clip moves through all six of the music states for the Ambush theme, demonstrating transitions called from a transition matrix.
Time      Music State
0:00      6 (combat 2)
1:22      transition
1:30      2 (sub-ambient)
2:14      transition
2:16      4 (suspense)
3:10      transition
3:12      3 (ambient)
4:08      transition
4:12      5 (combat 1)
5:33      transition
4:12      1 (silence)

--

GravityRide.mp3 Timeline
From the game: Russian Squares
Developed and Published by Microsoft in Microsoft Plus for Windows XP.
Music Composed and Arranged by Guy Whitmore, Erik Aho, Mike Min, and Bryan Robbins

This music clip demonstrates direct cue to cue transitions, some of which have the effect of instrument layering. Each cue increment represents a puzzle row being cleared by the player.

Music      Cue Time
Intro          0:00.0
 20          0:01.7
 21          0:09.1
 22          0:23.7
 23          0:53.1
 24          1:00.4
 25          1:07.7
 26          1:29.7
 27          1:37.0
 28          1:51.7
 29          1:59
 30          2:06.5
 31          2:21.0
 32          2:28.4
 33          2:35.7
 34          2:43.0
 35          2:50.4
 36          2:57.2
 37          3:12.2
 38          3:19.6
 39          3:27.0
 40          3:34.4
 41          3:41.5
 42          3:49.0
 43          3:56.3
 44          4:03.6
 45          4:11.0
End      4:18.3

Transitions

Harmonic systems. Altering the harmonic and chordal characteristics of a game score in real time via the game engine is largely uncharted territory. Systems exist to accomplish this, but few have attempted this with any depth. However, applying a few simple harmonic techniques can go a long way. One such technique is simply changing the key of a music cue to add variation or a change of mood (This is one of the advantages of MIDI-type music files over waves.) Another is to track the harmonic changes of a music cue so that layered cues will play 'in harmony' with the primary cue.

Run-time mixing and effects. How a piece of music is mixed dramatically affects the music's impact. The mood of pre-mixed music is set in stone, but highly adaptive music systems can alter the volume and panning of individual instruments, changing the character of a music cue. One example is to raise the volume of the percussion instruments to add punch to a mix as the drama on screen amps up. Run-time effects such as reverb, delay, chorus, etc. may also be controlled by the music system. Adding delay to a drum groove will change its rhythmic feel. Or imagine fading down music a cue, while bringing up the reverb, creating a distant ambient effect. Even if run-time effects are not used adaptively, they can help blur the seams between musical cues. The visual analogy is run-time lighting or shadowing effects. Those types of detail make an environment seam more alive.

Musical variation. Variation within a game score adds replay value to the music and the game. Many possibilities exist with regard to music variation. At a high level, when a music cue is called by the game engine, the music system could randomly pick between several wave files. This type of variability prevents specific pieces of music from repeating ad nauseam (e.g., "There's that battle music again!"). At a lower level, you could vary musical cues at an instrument level. Each instrument could have several possible parts, one of which is randomly chosen at run-time. This gives a piece of music an organic, non-looping feel, and allows the music to play for longer periods of time without feeling repetitive.

The Music System

Once the music functionality and type of technology are decided upon, it's time to make decisions about the music system and engine. The first decision is whether to use an available engine or to create one from the ground up (or perhaps you're lucky enough to work for a company that has a proprietary system). The creative needs of the game score and the limitations of the target platforms must be kept in mind when researching these options. This is also an area where collaboration with an experienced composer can help. An "adaptive music arranger" can help decide what type of technology will work best for a project.

There are few 'off-the-shelf' solutions for adaptive audio. Microsoft's DirectMusic supplies a great depth of technology and interactive features. But with that depth comes a steep learning curve for composers hoping to take advantage of these features. An upcoming book on DirectMusic (edited by Todd Fay, published by Wordware) will assist composers and programmers in learning and implementing the technology. Other technologies, such as the Miles Sound System, supply an audio playback foundation (MIDI, Wave, MP3 playback) that adaptive functionality could be built upon.

Proprietary technology exists at companies such as Sony, Electronic Arts, and LucasArts. The advantage of proprietary technology is that it can be tailored to specific genres and games of the company, and because the company owns it, the source code and experienced programmers are on hand to customize the technology according to the needs of the composers and designers. The obvious disadvantage is that the technology is not usually available to those outside the company.

Adaptive audio technology is still in the nascent stages of development, despite years of work by dedicated composers and programmers. Many techniques have been explored in a wide variety of games, ranging from early arcade games to modern consoles. Yet, a coherent language describing the techniques and technology has yet to arise, causing developers to reinvent the wheel over and over again. This is beginning to change. The IXMF standard (see the article by Linda Law in Gamasutra's 2003 Audio Resource Guide) promises to create a common adaptive-audio language and an industry-wide technology standard available to anyone. Also, the Adaptive Audio Now working group of the IASIG (Interactive Audio Special Interest Group, www.iasig.org ), will provide a forum and community for composers, designers, and programmers to share ideas, tips, articles, and opinions, regarding adaptive audio.

Integrating the Music System with the Game Engine

Regardless of the music system developed or used, it is how that system integrates with the game engine that ultimately determines its effectiveness. The most advanced music system and adaptive score will fall flat if it is not communicating well with the game engine. Communication between game engine and music system is crucial, and that communication is a two-way street. Not only must the game engine send commands to the music system, but the music system must tell the game engine its status.

There are various ways that this system integration takes place. Often, more than one technique is combined -- several "virtual connectors" between the two are used. There are two sides to this system: 1) what aspects of the music will be altered or changed by the game, and 2) how will the game trigger these changes in the music. The most common technique for changing the musical score is the use of music cues, but there are other musical aspects that can be altered by the game such as the music's volume, instrumentation, harmony, audio effects, tempo, muting/unmuting instruments, and layering themes or accents.

On the other side, the game engine can use various triggers to change the music. These types of triggers include: location based triggers, game-state triggers, NPC AI triggers, player character triggers, and event triggers. Each has its own advantages and usefulness. In deciding what types of triggers to use, first consider the nature of your gameplay, and how you'd like to emphasize and support that gameplay with music. This inquiry will lead to logical choices for music integration. As with other aspects of the music system, these trigger types can be combined and customized for your game's needs. In fact, it will take some trial and error to hone in on best parameters for the triggers. Don't give up after the first test of music integration. Successful integration may take some iteration.

The Music Must Adapt, And So Must We

Creating an immersive game score takes a coordinated effort. You need:

  • A team that is willing to put the extra effort towards realizing that goal.
  • A producer - and publisher - who are convinced that it's worth spending more for an integrated soundtrack.
  • A composer who has experience composing adaptive music or is willing to learn adaptive techniques.
  • A programming team with the time and experience to create and/or implement the music engine and system.

But despite these seemingly large hurdles, creating an effective adaptive score is relatively inexpensive. And the payoff is a score that will actually be a part of the game, as opposed to one that players may mute.

Yes, this is largely uncharted territory. But isn't exploring that territory what innovative game design is all about? Just as the flexibility of 3D graphics swept the industry in the mid '90s, adaptive scoring techniques are beginning find their way into more and more games. As this happens, standards will arise, techniques will evolve and mature, and new technology will be created. Those designing games now have a chance to impact the direction and role that music will play in games.

Music has the potential to be more than window dressing for games. It can directly support gameplay and heighten emotion. With a healthy collaboration between game designer and composer, music can be an effective game design tool, helping to establish and reinforce the core game design. Active aural landscapes working in tandem with 3D visual environments can set the stage for truly immersive gameplay.

 

________________________________________________________

[back to] Introduction


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service