Reference Devices compiles

audio_mixer_device: Dynamic Sound Mixing in UEFN

The `audio_mixer_device` lets you dynamically activate and deactivate control bus mixes at runtime — think muting footsteps during a hide-and-seek countdown, killing all music when a boss dies, or giving VIP players a richer soundscape. Every method on the device is exposed to Verse, so your scripts can orchestrate the entire audio mix of your island without touching a single timeline.

Updated Examples verified on the live UEFN compiler
Watch the Knotaudio_mixer_device in ~90 seconds.

Overview

The Audio Mixer device is UEFN's runtime mixing console. In Unreal's audio system, a control bus mix is a snapshot of volume/EQ settings for one or more control buses (logical groups of sounds like CBFortFootstep, CBFortWeapon, or your own custom buses). Placing an Audio Mixer device on your island and assigning it a control bus mix lets you flip that entire mix on or off from Verse — no Blueprint, no timeline required.

When to reach for it:

  • Mute or duck specific sound categories at a scripted moment (boss intro, stealth phase, cinematic).
  • Give registered players a different audio experience than non-registered players (e.g., a VIP zone with ambient music only they can hear).
  • Toggle a mix in response to game events: a button press, a zone entry, an elimination count.

The five Verse methods cover two concerns:

  1. Mix lifecycleActivateMix / DeactivateMix turn the assigned mix on and off.
  2. Player targetingRegister / Unregister / UnregisterAll control which agents are affected when the device's CanBeHeardBy setting is set to Registered Players or Non-Registered Players.

API Reference

audio_mixer_device

Used to manage sound buses via control bus mixes set on the Audio Mixer Device.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse).

audio_mixer_device<public> := class<concrete><final>(creative_device_base):

Methods (call these to make the device act):

Method Signature Description
ActivateMix ActivateMix<public>():void Activates the mix set on the audio mixer.
DeactivateMix DeactivateMix<public>():void Deactivates the mix set on the audio mixer.
Register Register<public>(Agent:agent):void Adds Agent as a target when using the CanBeHeardBy Registered Players or NonRegisteredPlayers options.
Unregister Unregister<public>(Agent:agent):void Removes Agent as a target when using the CanBeHeardBy Registered Players or NonRegisteredPlayers options.
UnregisterAll UnregisterAll<public>():void Removes all previously registered agents when using the CanBeHeardBy Registered Players or NonRegisteredPlayers options.

Walkthrough

Scenario: Hide-and-Seek Stealth Phase

Players spawn and have 30 seconds to hide. During that window the footstep bus is silenced (mix active). When the seeker presses a button the hunt begins and footsteps return (mix deactivated). A second button re-enters stealth for repeated rounds.

Island setup:

  1. Drag an Audio Mixer device onto your island. In its Details panel set the Bus to CBFortFootstep, Fader Value to 0.0, and enable Activate on Game Start so footsteps start muted.
  2. Drag two Button devices — one labelled "Start Hunt", one labelled "Re-enter Stealth".
  3. Create a Verse device, wire up the three @editable fields, and push to UEFN.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# hide_and_seek_audio_controller — mutes footsteps during hiding phase,
# restores them when the hunt begins, and can re-enter stealth on demand.
hide_and_seek_audio_controller := class(creative_device):

    # The Audio Mixer device with CBFortFootstep bus, Fader=0.0
    @editable
    FootstepMixer : audio_mixer_device = audio_mixer_device{}

    # Seeker presses this to start the hunt (restores footsteps)
    @editable
    StartHuntButton : button_device = button_device{}

    # Any player presses this to re-enter stealth (mutes footsteps again)
    @editable
    ReenterStealthButton : button_device = button_device{}

    # Tracks whether the stealth mix is currently active
    var StealthActive : logic = false

    OnBegin<override>()<suspends> : void =
        # The mix is already active on game start (set in device Details),
        # so reflect that in our state variable.
        set StealthActive = true

        # Subscribe to both buttons
        StartHuntButton.InteractedWithEvent.Subscribe(OnStartHunt)
        ReenterStealthButton.InteractedWithEvent.Subscribe(OnReenterStealth)

    # Called when the seeker presses "Start Hunt"
    OnStartHunt(Seeker : agent) : void =
        if (StealthActive?):
            # Deactivate the mix — footsteps return to normal volume
            FootstepMixer.DeactivateMix()
            set StealthActive = false
            # Disable re-enter button until stealth is needed again
            ReenterStealthButton.Enable()

    # Called when any player presses "Re-enter Stealth"
    OnReenterStealth(Requester : agent) : void =
        if (not StealthActive?):
            # Activate the mix — footsteps are muted again
            FootstepMixer.ActivateMix()
            set StealthActive = true

Line-by-line explanation:

Lines What's happening
@editable FootstepMixer Wires the placed Audio Mixer device into Verse. Without @editable the field is just a default empty struct — it won't point to your scene device.
var StealthActive : logic = false Mutable flag so we never double-activate or double-deactivate the mix.
set StealthActive = true in OnBegin Mirrors the "Activate on Game Start" checkbox we set in the Details panel.
Subscribe(OnStartHunt) Registers a class-scope method as the event handler. The handler signature must match (agent):void.
FootstepMixer.DeactivateMix() Tells the device to turn off its assigned control bus mix — footsteps return to full volume.
FootstepMixer.ActivateMix() Turns the mix back on — footsteps are muted again.
if (StealthActive?): The ? unwraps the logic value as a failable expression; the block only runs if the flag is true.

Common patterns

Pattern 1 — Register a specific player for a targeted mix

Some Audio Mixer devices use the CanBeHeardBy: Registered Players option so only certain agents hear the mix. Use Register and Unregister to manage that list at runtime — for example, giving a VIP player private ambient music when they enter a special zone.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# vip_zone_audio — registers a player when they enter the VIP trigger,
# unregisters them when they leave.
vip_zone_audio := class(creative_device):

    # Audio Mixer set to CanBeHeardBy: Registered Players
    @editable
    VipMixer : audio_mixer_device = audio_mixer_device{}

    # Trigger volume placed around the VIP zone entrance
    @editable
    EnterTrigger : trigger_device = trigger_device{}

    # Trigger volume placed around the VIP zone exit
    @editable
    ExitTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends> : void =
        # Activate the mix so it's ready; only registered players will hear it
        VipMixer.ActivateMix()
        EnterTrigger.TriggeredEvent.Subscribe(OnEnterVip)
        ExitTrigger.TriggeredEvent.Subscribe(OnExitVip)

    # TriggeredEvent sends ?agent, so the handler receives an option
    OnEnterVip(MaybeAgent : ?agent) : void =
        if (A := MaybeAgent?):
            # Add this agent to the registered list — they now hear the VIP mix
            VipMixer.Register(A)

    OnExitVip(MaybeAgent : ?agent) : void =
        if (A := MaybeAgent?):
            # Remove this agent — they no longer hear the VIP mix
            VipMixer.Unregister(A)

Key point: trigger_device.TriggeredEvent is a listenable(?agent) — the payload is an option agent. Always unwrap with if (A := MaybeAgent?): before passing to Register or Unregister.


Pattern 2 — UnregisterAll on round reset

When a new round starts you often want a clean slate. UnregisterAll removes every previously registered agent in one call — no need to track who was added.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# round_reset_audio — clears all registered players and reactivates
# the mix fresh at the start of each round.
round_reset_audio := class(creative_device):

    # Audio Mixer managing round-start sound effects
    @editable
    RoundMixer : audio_mixer_device = audio_mixer_device{}

    # Button the host presses to reset the round
    @editable
    ResetButton : button_device = button_device{}

    OnBegin<override>()<suspends> : void =
        ResetButton.InteractedWithEvent.Subscribe(OnRoundReset)

    OnRoundReset(Host : agent) : void =
        # Tear down the current mix
        RoundMixer.DeactivateMix()

        # Clear every agent that was registered during the previous round
        RoundMixer.UnregisterAll()

        # Re-activate for the new round (fresh, no registered agents yet)
        RoundMixer.ActivateMix()

Why UnregisterAll matters: If you skip it and a player who was registered last round is now eliminated or has left the zone, they may still be in the internal list — causing unexpected audio behaviour for edge cases.


Pattern 3 — Toggle mix with a single button (stateful flip-flop)

The simplest real-world pattern: one button, one mixer, toggle on every press. This is the canonical example from Epic's own documentation, shown here in full compilable form.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

# toggle_audio_mixer — one button toggles the assigned mix on and off.
toggle_audio_mixer := class(creative_device):

    @editable
    AudioMixerDevice : audio_mixer_device = audio_mixer_device{}

    @editable
    ToggleButton : button_device = button_device{}

    var MixActive : logic = false

    OnBegin<override>()<suspends> : void =
        ToggleButton.InteractedWithEvent.Subscribe(OnToggle)

    OnToggle(Player : agent) : void =
        if (MixActive?):
            AudioMixerDevice.DeactivateMix()
            set MixActive = false
        else:
            AudioMixerDevice.ActivateMix()
            set MixActive = true

Gotchas

1. @editable is non-negotiable

Declaring MyMixer : audio_mixer_device = audio_mixer_device{} without @editable compiles fine but creates a default empty struct — it is not connected to the device you placed in the scene. Every device reference that should point to a scene object must be @editable so UEFN can inject the real instance.

2. ActivateMix / DeactivateMix are not idempotent guards

Calling ActivateMix() twice in a row is legal but can cause unexpected blending behaviour depending on the control bus mix settings. Always track state with a var flag (like MixActive : logic) and guard calls with if (MixActive?): / if (not MixActive?): to prevent double-activations.

3. CanBeHeardBy must be configured in the Details panel first

Register and Unregister only have an effect when the Audio Mixer device's CanBeHeardBy property is set to Registered Players or Non-Registered Players in the UEFN Details panel. If the device is set to All Players, these Verse calls are silently ignored.

4. trigger_device.TriggeredEvent sends ?agent, not agent

When you subscribe to a trigger's TriggeredEvent, the handler receives (?agent) — an option type. You must unwrap it before passing to Register:

OnTriggered(MaybeAgent : ?agent) : void =
        if (A := MaybeAgent?):
            MyMixer.Register(A)

Passing MaybeAgent directly to Register(Agent:agent) is a type error?agentagent.

5. UnregisterAll does not deactivate the mix

UnregisterAll() only clears the registered-agent list. The mix itself stays active or inactive — call DeactivateMix() separately if you also want to silence the bus.

6. No events on audio_mixer_device

The device exposes no listenable events — it is purely imperative. You cannot subscribe to "mix activated" or "mix deactivated" signals from the device itself; your Verse code must track state manually.

Guides & scripts that use audio_mixer_device

Step-by-step tutorials that put this object to work.

Build your own lesson with audio_mixer_device

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →