LogoLogo
API Status
  • 👋Welcome
  • 🌐What is Morpheus Platform?
    • Interoperability
  • â„šī¸Help
    • 📗Glossary
    • 🆘Support
    • Firewall problems
    • EULA
  • CREATION
    • 🎮Unreal Development
      • ⚡Get Started
        • âš’ī¸Download the Editor
        • âĢUpload Content
        • 🌎Creating your own map
        • 📝Morpheus Base Project
        • ❓Differences from Unreal
          • 🧍Character Configuration
        • 📡Morpheus Networking
          • Introduction to Morpheus Networking
          • Network Levels
          • Replicated Properties
          • RPCs
          • Morpheus Render Targets
          • Morpheus Array
          • Networking FAQ
          • Replicating Sublevels
      • 📚Features & Guides
        • 📒Example Plugin
          • Nameplates
          • In-game roles
          • Resizing
        • 🏊Actor Pooling
        • 🔊Audio
        • 🎭Avatars
          • Creating an Avatar
          • Attachments
            • MML Attachments
          • Custom Animation Variables
          • Importing an NFT collection
          • Capsules and Mesh Transforms
        • 🤖Bots
        • đŸŽ™ī¸Chat
          • Unreal Text Chat
        • đŸŽ›ī¸Control Panels
          • Control Panel Configuration
          • DJ booth mission control
          • Observer Controls
        • 🔉Crowd Audio
        • đŸ¤ŧCrowd Rendering
          • Legacy Animated Crowd
            • Animated Crowd Console Commands
            • Attaching static meshes to crowd members
          • Crowd Materials
          • Performance Parameters
          • Live Config Settings
          • Crowd Animation
            • Crowd Anim Blueprint
              • User Guide - Crowd Anim Blueprint
              • Reference Guide - ABP Nodes
                • Animation Playback
                • States and State Machines
                • Variables
                • Transitions
                • Special
                • Blends
                • Additional Notes
        • 🍱Helpers & Extras
          • "Instanced Objects" in Blueprints
          • Objects with "world context"
          • Making DataAsset classes
          • Duplicate Objects
          • The Bootflow Subsystem
          • The "Wait For Condition" System
          • Advanced Graphics settings
          • Listening to inputs on UObjects
          • Morpheus UserID
          • World Services
          • M2Extras: Skins System
        • đŸ–Ĩī¸Loading Screen
        • ⚡Live Config
          • Editing for a World
          • Editing Locally
          • Default Settings
          • Accessing via Blueprint
          • Adding New Settings
          • Overriding Defaults
          • Using Arrays
        • 🧊MML
        • đŸ•ēMotion Capture
        • 📡Networking
        • đŸ“ĸNotifications
        • Raycastable Crowd
        • 🌐Singletons
        • 📱Streaming & Multiplatform
          • GFN on mobile
        • đŸ–Ĩī¸UI
          • "UI Mode"
        • đŸ—ƒī¸User Collections
          • Creating a New Object Definition
          • Accessing from Unreal
            • Creating Objects Definitions
            • Transfer Objects
            • User Collection Views
            • Receiving Updates
        • đŸ“ēVideo Players
          • Embedded Video Player
          • Millicast video streaming
            • How to Setup an In-Game Video Stream
            • Picture-in-Picture mode
          • Streaming Video Player
            • How to Setup a URL Video Player
            • Picture-in-Picture mode
        • 🐞Visual Debugging
          • Inspector
        • đŸĒŸWeb UI
        • Online Services
          • KV Store Service
        • 💠Web Requests
          • Http Requests
            • Legacy HTTP Nodes
          • JSON Handling
          • WebSockets
          • Identity Validation
          • Allowed External URLs
          • Walkthrough Example
            • Example Counter Service
        • âœˆī¸World Travel
          • World Travel in the editor
        • Avatar Physics Assets
        • Action Gameplay Helper Components
      • 🔑Workflows
        • â†—ī¸Upgrade the Editor
          • đŸ–Ĩī¸Version History
        • âš™ī¸Editing Project Settings
        • 📈Profiling
        • đŸ§ēMarketplace Importing
        • đŸ› ī¸Extra Workflows
          • Setup Play-in-Editor
          • Setup Local Asset Validation
          • Adding Gameplay Tags
          • Validating Game Assets
          • Custom Connection Modes
          • Connect Editor to a World
          • Common Issues
      • 📚Useful Reading
        • ⭐Best Practices
    • 🌎Worlds
      • 📩Invite Players
        • Setting Role Groups
      • Persistent Worlds
      • Always on Worlds
    • 📅Running events
      • ✅Large scale events - Checklist
      • 👾Anti-Cheat (EAC)
      • 🎮Player Entry
        • 📱React Native
        • Steam
        • đŸ’ģHardware Reqs
      • đŸŽĨBroadcast
        • 📹OBS Integration
      • Failover
      • 🏁Capacity And Queue Management
  • ADMINS
    • đŸ‘ĒAccess Control
      • Adding metaverse contributors
      • Creating a new project
    • 💲Pricing
      • Development Support
      • Included Usage & Overages
      • Cloud Streaming
      • Access Modes
      • War Room Support
      • Platform SLA
    • âš™ī¸Settings
      • đŸ—ƒī¸Projects
  • APIs and Tooling
    • đŸ–Ĩī¸API Reference
      • Accounts
      • Events
      • Key/Value Store
      • Organizations
      • Realtime
      • User Profile
      • World Builder
      • Worlds
    • đŸ’ģTemplate Web App
      • đŸ’ĸModeration
    • Pixel Streaming
    • 🚀Launcher
  • Integrations
    • 📊Analytics
      • Sending events from web
      • 🎮Sending Events from Unreal
    • đŸ’ŦChat
      • 🎮Integrating Pubnub with your Unreal Project
      • Adding Moderation to Chat
Powered by GitBook
On this page
  • Unreal Engine Documentation
  • Overview
  • Importing Audio
  • Volume Settings
  • Controlling the volume settings
  • Making new Audio Respond to the Volume Settings
  • Important Audio Asset Properties

Was this helpful?

  1. CREATION
  2. Unreal Development
  3. Features & Guides

Audio

PreviousActor PoolingNextAvatars

Last updated 4 months ago

Was this helpful?

For docs on Morpheus Crowd Audio see

Unreal Engine Documentation

This page will only provide a brief overview of audio content, and how it works within an MSquared project. As we are working with the Unreal Engine native audio solution, it is advised to read the Unreal Engine Documentation on .

Overview

Audio content in Unreal falls into several asset types, the most common being as follows:

  • SoundWave: This is a single piece of audio with a list of configurable properties. It can be played back from an AudioComponent as is, or added to a SoundCue or MetaSoundSource.

  • SoundCue: This is a legacy system for playing back SoundWave assets with additional behaviours. For example, you can have a collection of sounds that are randomly played each time the SoundCue is triggered. It is not recommended to use SoundCues, as all of the functionality is provided by MetaSoundSources, and the asset type may be depreciated in a future engine update.

  • MetaSoundSource: This is an asset that allows the combination of multiple SoundWaves with synthesisers, effects and various other effects, behaviours and forms of manipulation.

It is recommended to use SoundWaves for most content, only using MetaSoundSources when more complex behaviour is required, such as:

  • Choosing a random sound from a pool and playing it each time the sound is triggered.

  • Mixing multiple sounds together.

  • Blending between two or more sounds over a distance.

  • Manipulating a sound with effects.

  • Parameter-based behaviour that can be controlled by Blueprints.

Importing Audio

How should I import audio content?

Assets should be imported from an uncompressed .wav file (therefore allowing Unreal to compress the audio), which can be done by simply dragging and dropping a .wav file from Windows into the Content Browser. This will create a SoundWave.uasset with an identical name to the source audio .wav file.

Volume Settings

We have a number of different "volume channels" in our project, that can be used to control the volume of different channels per client:

  • master_volume (Will control all volume)

  • sfx_volume

  • voice_volume

  • music_volume

Controlling the volume settings

These can be controlled in-game via the user's settings, using the GetVolumeLevel and SetVolumeLevel helper functions on the J_GameUserSettings (the settings class used in MSquared projects)

The WBP_M2Example_SettingsMenu provides a simple example of how you can add settings to your project to control these volume levels.

The deprecated UI (BP_Origin_HUD) has a settings menu that applies these volume settings (see BP_VolumeExecutor). A similar flow can be added to your UI if you want.

Making new Audio Respond to the Volume Settings

In order to have your game sounds affected by the audio volume sliders, you need to ensure that you have correctly set their SoundClass.

This can be accomplished in two ways:

  • Setting the SoundClass on the asset itself (strongly recommended, see below).

  • Setting a Sound Class Override on an actor.

For example, if you have an AmbientSound actor, you can make it respect the Music Volume slider by adding the following SoundClass override:

To set up the appropriate sound classes, you can either use the existing ones, or make your own. To make sure that they map to the appropriate volume setting, you will need to link them to the appropriate SoundControlBus: (either directly through its list of VolumeModulators, or through a submix class):

  • master_volume - No sound class needed, will be applied to all sounds

  • sfx_volume - any SoundClass with CB_M2_ClientVolumeControl_SFX added to its list of VolumeModulators (or using a submix that has this)

    • e.g. SCL_M2_NonWorld_UI or SCL_M2_World_Ambience

  • voice_volume - any SoundClass with CB_M2_ClientVolumeControl_Voice added to its list of VolumeModulators

    • e.g. SCL_M2_World_Dialogue or SCL_M2_NonWorld_Dialogue

  • music_volume - any SoundClass with CB_M2_ClientVolumeControl_Music added to its list of VolumeModulators (or using a submix that has this

    • e.g. SSM_M2_World_Music) e.g. SCL_M2_World_Music or SCL_M2_NonWorld_Music

(World/NonWorld in this case denote Diegetic (typically 3D, in the world)/Non-Diegetic (typically 2D))

Important Audio Asset Properties

MSquared has some example audio added, such as footsteps, which rely on correctly setting parameters on imported content. It is also important to be aware of the hierarchy of properties - i.e. some properties (such as Attenuation) on a SoundWave are ignored if the SoundWave is used in a MetaSoundSource.

The hierarchy is as follows:

  • AudioComponent: This component is required to play any sound, and any properties set on the component will override those on any assets being played through it.

  • SoundCue / MetaSoundSource: These assets contain and combine SoundWaves, and will override the properties defined on any SoundWave they contain.

  • SoundWave: This is the "lowest-level" and most simplistic audio .uasset.

As a consequence of this, if an Attenuation property is set on a SoundWave, but the SoundWave is played inside of a MetaSoundSource with no Attenuation setting, then the outputted audio will be in 2D (i.e. with no attenuation or spatialisation).

Important properties to be aware of:

  • SoundClass: This property defines the "category" of a sound and to which channel of the mixer system the audio will be routed. For example, this system is used by volume sliders in the pause menu. Adjusting the UI slider will only change the volume of sounds that are being sent to the UI channel, which can be accomplished by setting the SCL_M2_NonWorld_UI SoundClass.

  • Attenuation: This property defines the spatial behaviour of a sound - i.e. how it behaves in 3D space. The default null value will play a sound in 2D (i.e. it will sound the same regardless of your position, orientation, etc.) Using an Attenuation asset with spatialisation will make the sound play from a world location (i.e. the location of the AudioComponent that is playing it).

Note that is it not possible for a non-spatialised sound to have attenuation, but it IS possible for a spatialised sound to NOT have attenuation (i.e. a sound that plays from a point in the world, but never gets quieter, regardless of how far away you are.)

  • Looping: This property (when true) will set a sound to repeatedly play in a continuous loop. This is useful for ambient sounds, like running water in a river. If there is a noticeable gap where a sound stops and starts, it will ruin the immersion, so a continually looping sound will better simulate the sound of a flowing river.

Note: volume multipliers in Unreal are multiplicative, so setting the volume of a SoundWave to 0.5, then adding that SoundWave to a MetaSoundSource, and setting its volume to 0.5, will result in the sound playing at a volume of 0.5 multiplied 0.5, or 0.25. This also means that a sound can be muted by setting its volume to zero at any stage.

🎮
📚
🔊
Voice Chat
Working With Audio