Automated Event Creation in Wwise with WAAPI
One of the most repetitive tasks in Wwise is creating events for audio objects. The "Create Event(s) on Work Unit" tool automates this process, generating properly structured events with a single click.
What Is the Create Events Tool?
This WAAPI tool automatically creates events for selected Sound SFX, Containers, or other playable objects in your Wwise project. It handles event creation, naming, and work unit organization intelligently, saving hours of manual work on large projects.
Instead of right-clicking each sound, navigating through menus, and manually naming events, this tool creates properly formatted events in seconds.
How to Use the Create Events Tool
Basic Usage
Step 1: Select Your Objects
In the Actor-Mixer Hierarchy or any other view, select the objects you want to create events for. You can select:
- Individual Sound SFX objects
- Random or Sequence Containers
- Switch Containers
- Blend Containers
- Multiple objects at once (Ctrl+Click or Shift+Click)
Step 2: Run the Tool
Right-click on your selection and navigate to "waapi-tools" → "Create Event(s) on WU" from the context menu.
Step 3: Configure Options
A dialog appears with event creation options:
- Event Type: Choose between Play, Stop, Play_Stop, or custom event types
- Naming Convention: Select prefix/suffix patterns (e.g., "Play_ObjectName")
- Work Unit Selection: Choose target work unit or create a new one
- Organize by Type: Group events by category (Weapons, Footsteps, UI, etc.)
Step 4: Create Events
Click "Create" and the tool will generate all events instantly. You'll see a summary of created events and any warnings or errors.
Advanced Features
Batch Event Creation
Select an entire folder of sounds and create events for all children at once. The tool intelligently handles hierarchies and skips objects that already have events.
Smart Naming
The tool offers several naming patterns:
- Play_[Name]: Standard play event naming
- Stop_[Name]: For stop events
- [Name]_Play: Suffix-based naming
- Custom Pattern: Define your own naming convention
Event Action Configuration
Choose what actions the events should perform:
- Play: Simple play action
- Play with Stop: Creates both play and stop events
- Play with Resume: For music or continuous sounds
- Custom Actions: Define specific action combinations
Common Workflows
Weapon Sound Events
Create play events for all weapon fire sounds with consistent naming:
- Select all weapon Sound SFX objects
- Run the tool with "Play_" prefix
- Creates: Play_Weapon_Pistol_Fire, Play_Weapon_Rifle_Fire, etc.
UI Sound Events
Batch create UI events with stop actions:
- Select UI sound folder
- Choose "Play with Stop" option
- Organize into "UI_Events" work unit
Dialogue Events
Create events for dialogue containers:
- Select dialogue Switch Containers
- Use custom naming: "DLG_[CharacterName]_[Action]"
- Group by character in separate work units
How It Works: Technical Details
WAAPI Event Creation Flow
The tool follows a structured process using multiple WAAPI calls:
1. Object Query and Validation
First, the tool gathers information about selected objects:
- Uses
ak.wwise.ui.getSelectedObjectsto get selection - Queries
type,name, andidproperties - Validates that objects are playable types (Sound, Container, etc.)
- Checks if events already exist for these objects
2. Work Unit Management
The tool determines where to create events:
- Queries available event work units using
ak.wwise.core.object.get - Creates new work units if needed using
ak.wwise.core.object.create - Organizes by specified category structure
3. Event Object Creation
For each selected object, the tool creates an event:
- Constructs event object using
ak.wwise.core.object.create - Sets event type to "Event"
- Applies naming convention to event name
- Places event in appropriate work unit
4. Action Creation and Linking
Events need actions to be functional. The tool:
- Creates action objects within each event
- Sets action type (Play, Stop, Resume, etc.)
- Links action to target audio object using
ak.wwise.core.object.setReference - Configures action properties (fade time, scope, etc.)
5. Relationship Building
The tool establishes proper parent-child relationships:
- Events are children of work units
- Actions are children of events
- Actions reference target audio objects
Key Code Components
WAAPI Object Creation
The tool uses ak.wwise.core.object.create extensively. Here's
the general pattern:
- Specify parent object (work unit)
- Define object type ("Event", "Action")
- Set initial properties (name, behavior)
- Receive created object's GUID for further operations
Reference Management
Linking actions to targets uses ak.wwise.core.object.setReference:
- Takes action object GUID
- Specifies reference type ("Target")
- Sets target object GUID
Bulk Operations
For performance, the tool batches operations:
- Collects all objects to process
- Creates events in batch when possible
- Uses async WAAPI calls for parallel processing
- Commits changes to project in single transaction
Error Handling
The tool includes robust error handling:
- Duplicate Detection: Checks if events already exist and offers options (skip, replace, rename)
- Type Validation: Ensures selected objects can have events
- Naming Conflicts: Detects and resolves event name collisions
- Transaction Rollback: If creation fails, reverts all changes to maintain project integrity
- Detailed Logging: Reports success/failure for each object
Data Structures
The tool maintains internal data structures for processing:
- Object Registry: Maps source objects to created events
- Work Unit Cache: Stores available work units to avoid repeated queries
- Naming Map: Tracks generated event names to prevent duplicates
- Action Templates: Predefined action configurations for different event types
Customization and Extensions
Custom Naming Patterns
You can modify the tool to use your studio's naming conventions. Edit the naming pattern configuration in the source code or create a JSON config file.
Additional Action Types
Extend the tool to support custom action combinations:
- Play with pitch randomization
- Seek to specific timeline positions
- Set state or switch values
- Post event with callbacks
Integration with Pipeline
The tool can be called from command line or integrated into larger pipelines:
- Automated event creation on audio import
- Batch processing during build processes
- Integration with version control workflows
Best Practices
- Consistent Naming: Establish and maintain naming conventions across your project
- Work Unit Organization: Group related events in logical work units
- Incremental Creation: Create events for new assets as you add them
- Regular Cleanup: Periodically review and remove unused events
- Documentation: Document your naming and organization scheme for team members
Performance Considerations
- Creating 100+ events at once may take several seconds
- WAAPI operations are network-based, so performance depends on connection
- Large projects with many work units may require longer query times
- Consider processing in smaller batches for very large operations
Conclusion
The Create Events tool demonstrates how WAAPI can automate tedious workflows in Wwise. By handling event creation programmatically, sound designers can focus on creative decisions rather than repetitive clicks.
This tool is particularly valuable for large projects with hundreds or thousands of events. The time savings and consistency improvements make it an essential part of any WAAPI-enabled workflow.