This section gives an overview of how to apply Audio to Mannequin, please note however that the article Mannequin Editor Tutorial 1 is prerequisite knowledge for the following information.
Audio in Mannequin is controlled by adding Procedural Clips to Fragments and setting their Type to Audio in the Procedural Clip Properties.
Fragments are played on Scopes, but there are no technical restrictions on which Scopes the Audio Procedural Clips are placed. However, it is quite common for a project to setup a Mannequin character in such a way that certain Scopes are reserved exclusively for the placing of ATL-Triggers on them. For example, in the case of the Sandbox Editor setup we have the "Audio1" and "Audio2" Scopes for which all ATL-Triggers are placed.
Mannequin decides which Fragments it will trigger via Tag States. This allows flexibility in supporting Animations with Sound, so you can go very granular or stay rather generic.
The CryMannequin Editor Guide describes how to add tags to a Fragment. These tags define what needs to be going on in the game or with the character in order for that specific Fragment to be selected.
For example, say you want to support each weapon with a different Sound or when a weapon is fired by (the player or by AI), and don't necessarily want to distinguish whether the player is crouching or standing or if the AI is shooting in ironsight etc. Then to obtain this behavior of having specific ATL-Triggers based on the weapon a Fragment with the "fire" FragmentID that has the tag "rifle" can be provided - this ensures that it gets selected every time the game fires with a rifle.
The game might also trigger extra tags such as "standing" or "crouch" depending on the characters stance, but will always pick the best fitting one - this means the one that matches most of the tags provided. If you decide to provide more detail then this can be achieved by creating different Fragments with different ATL-Triggers and a wider range of tags.
To learn more about Tags please read the article Tags
Enabling Scopes for a Fragment
Depending on your setup, you might want to place ATL-Triggers in specific Scopes. For example, in the Sandbox Editor setup, Sounds are usually placed in the "Audio1" or the "Audio2" Scopes.
Furthermore, the preferred way of enabling a Scope for a FragmentID is to edit its default Scope Mask: When editing a FragmentID you can select which Scopes it should use by default.
For an extensive step by step guide on how to achieve this please refer to the following section in the Mannequin Editor Tutorial 1.
Adding a ProcLayer Track
Once you have decided on which Scope you want to place the ATL-Triggers on, you then need to create a ProcLayer Track.
To add a ProcLayer Track, right click on the Scope and select "AddTrack->ProcLayer"
Afterwards the layout should look like screenshot below.
To learn more about these tracks and their properties please read the article Mannequin Track Properties
Creating an ATL Trigger on an Audio Proc Layer
In the ProcLayer’s timeline double-click to add a Procedural Clip. The clip can be moved by dragging its start point.
Under the Procedural Clip Properties menu you can set what type the clip should be.
In order to execute ATL-Triggers click on the Type property and select Audio.
You can see that this selection changes the options available for the clip in the Procedural Clip Properties (screenshot below). It is now possible to set a Start and Stop Trigger and define its behavior.
When the Fragment ends the Sound stops and as described in the Start/Stop Trigger behavior see here.
To keep the Sound playing, then use do_nothing as the StopTrigger.
The Blend time does not affect the fade-in of a Sound.
You can add any number of ProcLayers to a Scope which can help you to better organize your Fragment.
Procedural Clips can be added to any ProcLayer on any Scope. Just be aware that depending on your setup the clips might then be saved to a different Database file.