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 instances of sounds belonging to that category.
These are the steps to making and assigning Microsoft Cross-Platform Audio Creation Tool (XACT) categories.
Categories are a type of global setting, along with variables and run-time parameter controls. They are listed in the project tree at the same hierarchy level as wave banks and sound banks.
An XACT project is automatically provided with two top-level categories, the Default category, which is assigned to all sounds not explicitly assigned to any other category, and the Music category, which is intended for streamed background music.
An audio designer may create new top-level categories as required.
To create a new category
Navigate to the Global Settings menu, and select New Category. You can also create a new category by pressing Ctl+T.
Figure 1. Creating a new category using the menu toolbar.
The new category is listed under the Categories branch of the project tree. This new category has the default name "Category".
Select the new category.
Press F2 and enter a more descriptive name for the category. You can also rename a category by changing its Name property in the properties frame.
When the category is selected in the project tree, its properties are displayed in the property frame, and may be changed. The following table describes the properties of a category as they appear in the property frame.
When the category is selected in the project tree, its properties are displayed in the property frame, and may be changed.
Property Name | Description |
---|---|
Name | The default name of a category is Category. You can rename the catagory by changing this selection, or by selecting the name displayed in the project tree frame. |
Notes | Comments from the designer. |
Volume | The master volume level for all sounds assigned to this category. The range is from -96 dB to 6 dB. |
Public | If set to True, this category of sounds is available to the sound programmer (the default). If set to False, access to this category of sounds is restricted, intended for internal use by the creator of the content. |
Property Name | Description |
---|---|
LimitInstances | If set to True, the number of playing instances permitted at one time within the category is limited to MaximumInstances. |
MaximumInstances | Specifies how many playing instances are permitted at one time within the category, if LimitInstances is set to True. |
BehaviorAtMax |
Specifies the action to take once the limit you specify is reached within the category. If LimitInstances is set to False, these properties are ignored. The property offers the following selection of behaviors:
|
InstanceToReplace |
If LimitInstances is set to True and BehaviorAtMax is set to Replace, XACT will replace the instance according to one of the following selected criteria:
|
HowToReplace |
Specifies the style of fade of a replaced instance.
|
FadeOutDuration |
The period in seconds to fade out the replaced sound. |
FadeInDuration |
The period in seconds to fade in the replacing sound. |
Categories may be created that are subordinate to another category.
To create a subcategory
Right-click on the desired category in the project tree and select New Subcategory.
Figure 2. Creating a subcategory under an existing top-level category.
The new subcategory is listed under the parent category. This new category has the default name "Category". All properties for the new subcategory are set to the defaults (properties are not copied from the parent category).
Select the new subcategory.
Press F2 and enter a more descriptive name for the subcategory. You can also rename a subcategory by changing its Name property in the properties frame.
Categories are useful only once they have been assigned to sounds. Once categories are assigned, they will ensure that the sounds assigned to them operate within the same functional boundaries.
For information on how to create sounds, see Working With XACT Sound Banks.
To assign a category to a sound
Double-click the sound bank in the project tree to open the Sound Bank window.
Drag and drop the sound you want to associate onto the desired category in the project tree.
- OR -
Double-click the sound bank in the project tree to open the Sound Bank window.
Select the sound you want to assign to the category.
The sound's properties are displayed in the XACT properties frame.
In the Sound Properties section, select the drop-down list of the Category property.
The list of available categories are displayed in the drop-down list.
Choose one of the available categories to set this property.