Working with the Microsoft Cross-Platform Audio Creation Tool (XACT) requires a working knowledge of some general terminology and concepts. This section discusses these terms as they apply to the XACT.
An XACT project is composed of three top-level collections of information, Wave Banks, Sound Banks and Global Settings. Each of these components will be represented by a data file, to be conveyed to the title programmer, once the project is built.
Icon | XACT Term |
---|---|
Wave Banks (file extension .xwb) | |
Waves | |
Sound Banks (file extension .xsb) | |
Sounds | |
Tracks | |
Events | |
Cues | |
[no icon] | Global Settings (file extension .xgs) |
Categories | |
Variables | |
Runtime Parameter Controls | |
DSP Effect Path Presets | |
Compression Presets |
A wave bank is a collection of waves logically grouped into a single file by an audio designer. When an XACT project is built for integration into a game title, each wave bank is represented by a file with the extension .xwb.
For example, user interface waves that are always resident in memory may be stored in one wave bank, while waves used for sound effects are stored in another.
Figure 1. XACT Wave Banks
XACT supports two types of wave banks, in-memory and streaming:
In-memory wave banks are, as the name implies, held in active memory and delivered to the audio output as gameplay proceeds. This is typically used for small audio resources, such as sound effects or pieces of dialogue.
Streaming wave banks are transferred directly from the DVD to the audio output through an intermediate memory buffer. This mode is typically used for large audio resources, like background music or ongoing soundtrack, which would otherwise require a great deal of system memory.
For more information on streaming wave banks, see XACT Streaming Wave Banks.
Waves are audio data files that are used whole or as building blocks for creating sound effects. XACT supports the following audio formats for waves:
You can use any of several commercially available applications to create waves.
A Sound Bank is a collection of sounds and cues logically grouped by the sound designer. When an XACT project is built for integration into a game title, each sound bank is represented by a file with the extension .xsb.
A sound bank file does not contain wave data; wave data reside in wave banks. A sound bank references the waves that are bundled in wave banks, and houses the information on how they are to be played.
The components of a sound bank are sounds and cues.
The diagram below illustrates how a sound bank designed for a game title might define its cues and sounds, and how sounds might be mapped to individual waves:
Figure 2. XACT Sound Banks
A sound specifies how one or more waves should be played. A sound also has specific properties such as volume and pitch. These properties can be adjusted by the sound designer.
Sounds are composed of tracks and events.
A Track is a grouping of events that, together, define a sound. A sound is composed of one or more tracks.
Each track can contain a single Play Wave event, as well as any number of other events (such as markers and volume changes). Each track of a sound plays only a single wave at any given time. For sounds that require wave files to be played concurrently, you may create multiple tracks, each with its own Play Wave event (and again, each with as many other event types as you wish).
Events are actions to be performed within the body of a track. A track must have at least one event. The simplest event type is a Play Wave event, which plays a wave.
The simplest style of a Play Wave event is one that plays a single wave. However, a play event may also play a wave from a wave variation list, which can play waves in sequence, or randomly selected.
Other events control or constrain the manner in which the wave is played. They may include the following:
Cues are what programmers use to play sounds. (Sometimes playing a cue is called "triggering" a cue.) Cues are typically played when certain game events, such as footsteps or gunshots, occur. A cue is composed of one or more sounds, so when the cue is triggered, the set of associated sounds is heard.
A cue can be associated with a sound variation list instead of a single sound, and the audio designer may specify that sounds in the list are to be played in strict sequence, shuffled or randomly selected.
A sound designer can easily reassign sounds to a cue without programmer intervention. For example, a sound designer can try various gunshot waves associated with a particular game event without requiring the programmer to change their code or rename sounds.
Some settings are considered global, which means they are not tied exclusively to a wave bank or sound bank. These are defined within the Global Settings (XGS) file that is generated when the XACT project is built. These global settings are the following:
Categories are a way of sorting audio resources into common behaviors.
Assigning sounds to categories allows the programmer to collectively change settings for similarly associated sounds. It can also ensure that a sound assigned to a category behaves according to a common set of rules, including a limit on the number of playing instances of sounds belonging to that category.
For example, a sound designer of a role-playing game might group all dialogue spoken by antagonists into a single category, so that all voices are played at a common volume, paused and restarted in unison, or limited to no more than three active at once.
XACT also allows categories to belong to other categories (also known as subcategories). For example, a category of "Dialogue" may be further broken down into "Allies" and "Enemies."
A sound may be assigned to only one category. XACT supports up to 255 categories.
XACT provides three predefined categories:
Variables are the programmer's control mechanism for Run-Time Parameter Controls (RPCs). They can also be used to control branch/wait events.
The sound designer defines the name of the variable, its allowable range and the initial value.
Variables may be global, which may be responded to by multiple cues, or cue instance, which are associated only with a single instance of a cue.
Variables may be marked public, which are accessible by the game program, or private, which are controlled by and respond to the content alone as part of a Set Variable or Conditional event.
Run-Time Parameter Controls (RPCs), also known as "sliders", allow a sound to be varied under program control.
To illustrate, consider the case of an automobile simulation. Audio waves and pitches for the car's engine need to adjust as gear and RPM change. The developer could figure out what values need to be changed to achieve the desired effect and develop code to change them. But, with an RPC, this is not necessary. Using the XACT, the sound designer can provide the programmer with the control that dictates how the content responds.
DSP Effect Path Presets (DSPs) enable special digital signal processing effects, such as reverb, to be applied to sounds.
Compression Presets enable the sound designer to define specific compression attributes that may be applied to individual waves or an entire wave bank.