Extension: omni.usd.schema.audio-0.0.1

Documentation Generated: Nov 13, 2025

Overview#

omni.usd.schema.audio defines USD schema classes for spatial and non-spatial audio functionality within USD stages. This extension provides the foundation for creating audio-enabled USD content by defining standardized schemas for sound sources and active listeners that can be integrated into USD scenes with proper spatial audio capabilities.

Key Components#

OmniSound Schema#

The OmniSound schema represents audio sources within a USD scene. This schema enables both spatial and non-spatial audio playback from audio assets, with comprehensive control over audio properties and effects. It supports various audio formats including Vorbis, Opus, FLAC, MP3, and WAVE files with up to 64 channels.

The schema provides spatial audio capabilities through distance attenuation, directional cone effects, and listener-relative positioning. Non-spatial mode allows direct multi-channel playback for music, narration, and ambient sounds without 3D spatial processing.

OmniListener Schema#

The OmniListener schema defines the audio listener’s position and orientation within the 3D scene. The listener determines how spatial audio effects are calculated based on its relationship to sound sources. It can either use its own transform for positioning or derive orientation from the current camera view, making it suitable for both first-person and third-person audio scenarios.

The schema includes directional hearing capabilities through cone-based volume and filtering effects, allowing simulation of realistic listening characteristics.

Sound and Listener Schemas#

The Sound and Listener schemas exist to provide deprecated names that inherit from OmniSound and OmniListener respectively. These provide backward compatibility while the OmniSound and OmniListener schemas represent the current recommended implementations. Please use the OmniSound and OmniListener prim types in new content development instead of using the deprecated names.

Tokens#

The Tokens class provides standardized string constants for all schema attributes and enumerated values, ensuring consistent naming across audio implementations.

Utility Functions#

The extension provides get_audio_prim_list function through the usd.schema.audio module for discovering audio-related prims within USD stages, facilitating audio system integration and prim management.

Usage Examples#

Creating an audio source in a USD stage:

import omni.usd.schema.audio as audio_schema
from pxr import UsdGeom, Usd

# Create a sound prim
sound_prim = audio_schema.OmniSound.Define(stage, "/World/MySound")

# Configure audio properties
sound_prim.CreateFilePathAttr().Set("path/to/audio.wav")
sound_prim.CreateGainAttr().Set(0.8)
sound_prim.CreateAuralModeAttr().Set("spatial")
sound_prim.CreateStartTimeAttr().Set(0)
sound_prim.CreateEndTimeAttr().Set(100)