Chapter 16: A DirectMusic Case Study for No One Lives Forever


Download CD Content

Guy Whitmore

An Overview of the Score

No One Lives Forever (NOLF) is a first-person action adventure game. It is a spy story set in the 1960s, complete with gadgets, gizmos, and guns. The player assumes the role of Cate Archer, British spy extraordinaire! As shooters go, it is refreshingly lighthearted and sprinkled with kitsch and humor.

Monolith Productions developed and Fox Interactive published No One Lives Forever for the PC in 2000. I composed and produced the adaptive score, and Rich Ragsdale contributed the title theme. Eric Aho, Nathan Grigg, and Tobin Buttram created the DirectMusic (DirectX 7) arrangements and composed additional music. Bryan Bouwman programmed and integrated the game's DirectMusic code, and Sonic Network, Inc. provided many of the DLS instruments (www.sonicnetworkinc.com).

For the soundtrack, I was asked to capture the flavor of the '50s/'60s spy genre, without infringing on any existing copyrights. Believe it or not, at first I was told to limit my use of brass instruments (this directive came to me through the grapevine via the Bond franchise). That is like being asked to produce a blues album without guitars! The powers that be quickly got over the legal paranoia, however. I did have one theme refused because of a subtle P5, m6, M6 melodic progression (made famous by composer John Barry), even though I thought it was the least "Bond-ish" of my themes. Actually, I drew more influence from German composer Peter Thomas, whose film scores have more of the lighthearted feel that we were after. The Barbarella soundtrack was also required listening.

I began the pre-production process by writing five or six themes and prototyping them. These themes became the backbone of the adaptive score. The adaptive scoring techniques for NOLF came out of the concepts and technology implemented for three previous Monolith games — Shogo: Mobile Armor Division, Blood II: The Chosen, and Sanity. Shogo: Mobile Armor Division was the first game I scored that broke the music down into separate music states, which matched the game action. Blood II: The Chosen and Sanity each added to those concepts, creatively and technically.

NOLF built upon my adaptive scoring foundation, improving on many aspects of my technique. This white paper describes the adaptive scoring concepts, the production process, and implementation process used to create this game score. In this case study I describe my intentions and the actual outcome, what worked and what didn't. I also describe what I'd like to achieve with future action scores.

The Adaptive Concept and Music States

NOLF gameplay has high points of action and ambient points — times when the pace is furious, and times filled with suspense. In many scenarios, the player may direct Cate in with guns blaring or sneak her through the situation at hand. Obviously, the same music cue wouldn't be appropriate for both approaches. Also, there's no way of predetermining how long a firefight might last and what might come immediately after it. These are the reasons that lead me to break the music down into flexible music states.

After writing a thematic idea, I arrange it in a variety of music states using subjective naming conventions that reflect their functionality (or intensity) in the overall score. Some of the tags I've employed are "ambient," "suspenseful," "action," etc. Each of these music states can play for an indeterminate amount of time. Typically, each music state has about one and a half to three minutes of music composed for it. It is sometimes difficult to calculate the exact amount of time when considering variations. As a general rule, I think in terms of how long a particular music state can hold a listener's interest (more on this later). A music state can repeat as necessary until another music state is called. I could also define the number of repeats. The music engine supported automatic transitions from one music state to another or even to silence. This prevents the music from repeating ad nauseum for moments when player interaction is limited.

Music Sets

Each musical theme in NOLF is arranged using six basic music states that make up a single music set. At the start of a level, one music set is loaded along with the rest of the level assets. The six standard music states are:

  • Silence

  • Super ambient

  • Ambient

  • Suspense/sneak

  • Action 1

  • Action 2

The key to composing music for any given music state is to give the music enough musical ebb and flow to keep things interesting while staying within the intensity range prescribed by the music state. For example, the "ambient" music state may rise and fall a bit in musical density but should not feel like it has moved up or down too dramatically. The goal is to maintain the musical state while holding interest. One way that the music sets in NOLF achieve this level of sustained interest is through instrument-level variation.

Using variation on just a few instrument tracks of a given music state was very effective and didn't cut too deeply into the production schedule. Instrument-level variation is used in the lower intensity music states quite often. These music states start differently every time they're called up, giving the illusion of more music. In some cases, a four-to eight-measure repeating music state feels like three to five minutes of fresh music.

Transitions: Getting from A to B and Back Again

The ability to transition between the various music states provides the flexibility needed for the soundtrack to adapt to the game state. Seamless musical transitions facilitate this adaptability in a way that sounds intentional and musically satisfying. In NOLF, any of the six music states may be called at any time. This means that any given music state must be able to modulate to any of the other five states.

This required transitions between states that made sense musically and did not interrupt the flow of the score. Sometimes simply starting the next music state on a logical musical boundary was all that was needed. Often, quickly ending one state and starting the next was enough. However, the most satisfying transitions were the ones that built up to a more intense music state or resolved downward to a less intense music state (without missing a beat, so to speak).

The Matrix

First conceived for the Shogo score, a transition matrix filled the need to keep track of the myriad of possible movements between music states. By defining the matrix in a simple script (more on the script later), I was able to assign short sections of music to act as specific transitions between states. When the game calls for a change of music state, it knows which music state is currently playing and which one it needs to move to and plays the appropriate transition between them.

The transition matrix acts as a look-up chart for the music/game engine. With six music states, there are 30 possible transitions. Needless to say, I didn't labor over 30 individual sections of music for each theme. Many transitions did not need transition Segments, as they sounded good cutting in on an appropriate boundary. Also, I found that some transition Segments could be used for multiple transitions between music states. Transitions were generally divided into two types to help clarify my thinking: transitions that move to a higher or more intense music state and transitions that move to a lower or less intense music state. Categorizing transitions in this way made reusing transition material easier (i.e., transitioning from music state three to music state two may be similar to "3 to 1," while "3 to 4" may be similar to "3 to 5" — but not always!).

Performance Boundaries

Key to making the transitions work musically were performance boundaries. Performance boundaries defined the points along a music state where transitions could take place. Boundary types included Immediate, Grid, Beat, Measure, and Segment. Each of these boundary types proved useful for different situations in NOLF. When a music state was rhythmically ambiguous, Immediate or Grid worked fine, allowing for the quickest transitions. Beat and Measure boundaries came in handy when the rhythmic pulse needed to stay constant, and Segment boundaries allowed the currently playing melodic phrase or harmony to resolve before transitioning.

Maintaining a balance between coherent musical transitions and the need to move quickly between states challenged us as arrangers. As you can hear if you play the game, some transitions work better than others. When a new state is called, there is an acceptable window of time to move to the new state. We used a window of zero to six seconds (eight seconds tops). This meant that at a tempo of 120 BPM, a four-measure phrase (in 4/4) was the absolute maximum that a current music state could finish prior to transitioning to the new state. One typical solution was to use two measure boundaries (for quicker transitions) for most of a music state and four measure boundaries in spots that called for them aesthetically.

Composing and arranging convincing musical transitions in an adaptive score twists your brain and forces you to think nonlinearly. The interactive score used in NOLF only scratches the surface in this regard; there is plenty of room for future innovation. I can say for certain that having written a number of nonlinear scores, I'll never think about music the same way again. In a way, it's freed my thinking about how music is put together. Even when listening to linear music, I sometimes think "Hmmm this piece could just as easily start with this section instead of that one" or "I bet they could've started that transition two measures earlier!," etc. Music is malleable and only frozen when we record it.

Stinger Motifs

Two or three of the music sets used in NOLF employed motifs. The motifs were applied as short musical accents, or stingers, that played over the top of the currently playing music state. Performance boundaries were set so that the motifs would be in sync with the underlying music, and Chord Tracks were used so that motifs would play along with a functional harmony (this was the only use of DirectMusic's difficult-to-navigate harmonic features).

These motifs were composed of brass riffs, quick guitar licks, and things that would easily fit over the music state Segments. More flexibility would have been nice so that different motifs could be assigned to specific music states (possible using DirectX 8 Audio scripting). Five or six motifs were written for each music set. The engine called a motif randomly when the player hit an enemy AI square in the head (ouch!). A silent motif was employed to prevent a motif from playing every single time.

Sounds and DLS Banks

All of the music in NOLF uses Microsoft's software synthesizer in conjunction with DLS. DLS banks are loaded into the software synthesizer (using RAM) and played via the DirectMusic engine. Each music set uses up to 8MB of DLS instruments (as 22 kHz samples), which are loaded as each game level is loaded. These DLS banks are selected, created, and optimized for each individual music set. This gives each music set its own timbral character that coincides with the aesthetic needs of each theme.

DirectX 7 doesn't have Wave Tracks, and DirectX 8 and above do; as a result, premixed tracks weren't an option. The DLS+MIDI approach provided the flexibility and practicality needed for features such as instrument-level variation and motifs that respond to harmonic information. My current projects use a combination of Wave/Streaming Tracks and DLS+MIDI Tracks. This provides a balance of premixed CD-quality waves with the flexibility of MIDI. However, as processor speeds continue to increase and better real-time DSP comes about, professional production values will be easier to attain via MIDI+DLS. The two approaches will likely merge and simply be two tools in the same toolbox.

Integration and Implementation

Even though we went with an off-the-shelf solution, namely DirectMusic, there was still a good amount of programming needed to successfully integrate the music engine with the LithTech engine (Monolith's game engine). Thankfully, much of the work was done on previous games, and we simply needed to update the code for NOLF. Perhaps the biggest leap in this area was in how the music states were tied to the game. In Shogo, Blood II, and Sanity, music states were called via location triggers placed strategically throughout the levels. This was a laborious task (done in the LithTech level editor) and a pain when enemy/NPC placement inevitably changed as the ship date neared. Necessity was the mother of invention for NOLF, as we didn't have the production schedule to individually place music triggers.

Bryan Bouwman and the fabulous programmers at Monolith came up with the bright idea of tying global game states and NPC AI directly to music states. This approach made perfect sense, as the game knows when there is action on the screen; it knows when Cate is sneaking around in "stealth mode," and it knows when the player is simply exploring a level. To add flexibility, the game state to music state assignments are done individually for each game level, so different levels could have different assignments. In addition, more than one music state could be assigned to a game state. For example, music states 5 and 6 were often both assigned to the "combat" game state and music states 1 and 2 to "exploration," etc. The game chooses randomly between them at run time. This means that you could play through the same level twice and have a somewhat different score each time, yet the music would be appropriate to the action in both cases.

Scripting

Monolith created a simple scripting method, which provided me with some control over the music asset management and implementation. Being a DirectX 7 game, we didn't have the DirectX 8 Audio Scripting that now comes with DirectMusic. In NOLF there is a script for each music set that is called when a game level is loaded. The script's basic functions are:

  • Load the music assets for the music set

    • DLS instruments

    • DirectMusic Styles, Bands, motifs, and Segments

  • Assign DirectMusic Segments to the six music states

  • Set up the transition matrix

    • Assign transition Segments

    • Assign transition boundaries

  • Set the basic reverb settings

  • Set up the motifs and their boundaries

The Test Player

Monolith also built a handy little LithTech DirectMusic player that contained the adaptive functionality used in the game. It loads a script and its music set and then plays the various music states using the correct transitions between them (a simple selector allows you to choose music states). Motifs can even be tested over the music states. This player was a lifesaver, as it allowed me to debug the music content in a game-like setting before implementing the content.




DirectX 9 Audio Exposed(c) Interactive Audio Development
DirectX 9 Audio Exposed: Interactive Audio Development
ISBN: 1556222882
EAN: 2147483647
Year: 2006
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net