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
  • Overview
  • Example Audio Component
  • Usage / Controls
  • Audio customisation
  • Broadcast channels
  • Muting individual players
  • Adjusting crowd audio settings

Was this helpful?

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

Crowd Audio

PreviousObserver ControlsNextCrowd Rendering

Last updated 29 days ago

Was this helpful?

Overview

MSquared provides large-scale, spatialised voice chat between players, alongside broadcast channels which allow for channel-based non spatialised (2D) audio.

The audio system consists of three parts:

  • The spatial audio Unreal plugin. This integrates the system with Unreal and provides an API to game code.

  • The audio client. This is a DLL that provides engine-agnostic processing functionality, and provides an interface to the connection between the client and the audio server.

  • The audio server. The server receives audio from each client, performs processing and aggregation, and then sends the mixed audio back to each client.

Example Audio Component

The character used in the example map, BPM_M2Example_PlayerCharacter, uses an example BP crowd audio component BPMC_CrowdAudio which enables the player to be able to use voice chat in game. Take a look at the BP logic inside this component to see how BP logic and interact with the audio API in the Unreal plugin to use voice chat.

Usage / Controls

Voice chat can be enabled either by pressing the button in the UI, or using the corresponding shortcut

  • C for regular spatial voice chat

    • This is "push to talk", not a toggle.

  • To use the loudspeaker you can stand on the pedestal in the Example map and speak. Loudspeaker is an example of broadcast audio.

  • It is also possible to configure the global mic to be available to certain players by granting them the Capabilities.Voice.VoiceLoudspeaker capability. This is off by default and you will need to set up your own HUD UI and input logic to use this.

  • Roles with the Capabilities.Voice.VoiceToggle capability can instead press to toggle.

    • Even if you are using toggle mode, holding the button down will be treated as push to talk. (If you hold for longer than the EnterPushToTalkDelay of 0.25 seconds).

Audio customisation

Crowd Audio has a large number of settings that allow you to control parts of the preprocessor, replication, aggregation, and other parts of the audio flow. Some features that you can configure include:

  • Broadcast channels

  • Reverb

  • Occlusion

  • Volume normalisation

  • Muting specific players

  • Disabling spatial audio for specific clients

Broadcast channels

Voice Chat is powered by the Crowd Audio system. Typically this is intended for spatial voice. However, it also handles 2D voice chat, using broadcast channels:

This is the way that the Crowd Audio system handles different "channels" for communication.

It is controlled via the following (on the CrowdAudioComponent):

  • Add/RemoveSubscribedBroadcastChannels - controls which broadcast channels you are listening to

  • Add/RemoveAvailableBroadcastChannels - controls which broadcast channels you are allowed to talk in.

  • SetSelectedBroadcastChannel - sets the channel that you are talking in (must be available)

  • SetVoiceInputEnabled(bEnabled, bBroadcast) - controls whether you are talking or not. If bBroadcastis true, you will use your selected broadcast channel. If not, you will use spatial voice.

When someone talks on "loudspeaker", they are using the global broadcast channel (0), which everyone is subscribed to.

Broadcast channels will allow you to implement things like team-specific voice chat or direct voice comms between specific individuals.

Muting individual players

Clients can be configured to locally mute individual other clients' spatial audio. You can do this via the following API on the CrowdAudioComponent :

  • AddMutedSourceId

  • RemoveMutedSourceId

You can obtain the speech source id to mute with GetSpeechSourceId on the target's CrowdAudioComponent.

Note that each additional muted user requires the audio server to do additional computation per tick. This isn't noticeable with low numbers of muted users or at low scale, but you should keep the number of muted sources per player to below 10 in high scale (>5,000) deployments to ensure good audio server performance.

Adjusting crowd audio settings

All other settings can be adjusted via the FCrowdAudioSettings struct or via LiveConfig.

Adjusting in BP logic

To adjust crowd audio settings in BPs, you need to set the Settings struct in the CrowdAudioComponent. Note that this will set all of the values to the defaults, so if you want to keep any changes that have been made, you need to make sure to reapply those.

Settings here are generally not applied globally, and will only affect what the local client outputs and receives.

Adjusting in LiveConfig

You can also adjust settings via LiveConfig, which will be applied globally. To do this, find the CrowdAudioSettings in LiveConfig and enable UpdateSettingsInTick, which will enable live config updates for crowd audio.

Note that this will override any custom settings you have applied.

🎮
📚
🔉
Here, I want to keep all the settings the same but disable audio occlusion. I get the Settings struct and forward all the fields onto the Set Settings node on the right except for audio occlusion, where I pass in my own audio occlusion settings struct.