Reference Devices

lfo_modulator_device: Living, Breathing Audio with Verse

The LFO Modulator is a Patchwork device that sweeps a setting on another Patchwork device up and down in a smooth, repeating pattern — perfect for a pulsing speaker volume or a filter that breathes. In Verse you don't shape the wave; you decide WHEN the modulation runs by calling Enable and Disable in response to gameplay.

Updated
The code on this reference page is provided as-is and did not pass the latest compile check — treat the examples as a starting point and verify in your project.
Watch the Knotlfo_modulator_device in ~90 seconds.

Overview

The LFO Modulator (Low-Frequency Oscillator) is part of UEFN's Patchwork audio system. You patch it (in the editor) to a setting on another Patchwork device — say the volume of a Speaker, or the cutoff of a Distortion Effect — and it sweeps that value back and forth in a regularly repeating wave. The wave shape, rate, and depth are all configured on the device itself in UEFN.

So what does Verse give you? Control over when the oscillation is active. The lfo_modulator_device exposes exactly two methods — Enable() and Disable(). That makes it the ideal tool for game-reactive audio: start the pulsing music when a boss spawns, freeze the breathing filter when the player solves a puzzle, or turn ambient modulation off when everyone leaves the zone.

Reach for the LFO Modulator when you want a sound parameter to feel alive and you want gameplay events to gate that life. Because it inherits from patchwork_device, its only Verse surface is the shared Enable/Disable pair — there are no events on the device itself, so you subscribe to OTHER devices (triggers, plates, buttons) and call the modulator from those handlers.

Note: A copied/pasted LFO device can sometimes output only 0. If your modulation looks dead, delete and re-place the device, or restart the session.

API Reference

lfo_modulator_device

Modify a setting on another Patchwork device in a regularly repeating pattern.

Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from patchwork_device.

lfo_modulator_device<public> := class<concrete><final>(patchwork_device):

Methods (call these to make the device act):

Method Signature Description
Enable Enable<public>():void Enables this device.
Disable Disable<public>():void Disables this device.

Walkthrough

The scenario: A haunted vault room. The room has a Speaker playing eerie music, and an LFO Modulator patched (in UEFN) to that Speaker's volume so the music throbs. We want the throbbing to start only when a player steps onto a pressure plate at the door, and to stop when they step on a second "exit" plate.

In UEFN you'd:

  1. Place a Speaker (Patchwork) and a Music Manager so it plays.
  2. Place an LFO Modulator, and in its settings patch its output to the Speaker's Volume.
  3. Place two Trigger devices (or pressure plates).
  4. Drag all four into the @editable fields below.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

haunted_vault_device := class(creative_device):

    # The LFO that sweeps the speaker's volume up and down.
    @editable
    VolumeLFO : lfo_modulator_device = lfo_modulator_device{}

    # Player steps here to START the throbbing.
    @editable
    EnterPlate : trigger_device = trigger_device{}

    # Player steps here to STOP the throbbing.
    @editable
    ExitPlate : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        # Start with the oscillation OFF so the room is quiet on spawn.
        VolumeLFO.Disable()

        # Wire the plates to our handler methods.
        EnterPlate.TriggeredEvent.Subscribe(OnEnterStepped)
        ExitPlate.TriggeredEvent.Subscribe(OnExitStepped)

    # Called when a player steps on the entrance plate.
    OnEnterStepped(Agent : ?agent) : void =
        if (Player := Agent?):
            # A real player triggered it — bring the music to life.
            VolumeLFO.Enable()

    # Called when a player steps on the exit plate.
    OnExitStepped(Agent : ?agent) : void =
        if (Player := Agent?):
            # Freeze the modulation; volume settles.
            VolumeLFO.Disable()

Line by line:

  • VolumeLFO : lfo_modulator_device = lfo_modulator_device{} declares an @editable field. This is mandatory — you can never call methods on a device that isn't a field you've linked in the editor. lfo_modulator_device{} is just a placeholder until you drag the real device in.
  • EnterPlate/ExitPlate are trigger_device fields. The LFO has no events of its own, so we drive it from triggers.
  • In OnBegin we call VolumeLFO.Disable() first. Devices may start enabled, so disabling guarantees a known starting state (silent, un-modulated).
  • EnterPlate.TriggeredEvent.Subscribe(OnEnterStepped) registers a method as the handler. TriggeredEvent is a listenable(?agent), so the handler receives (Agent : ?agent).
  • In OnEnterStepped we unwrap with if (Player := Agent?):Agent is optional because a trigger can fire without an instigator. Only then do we call VolumeLFO.Enable() to start the wave.
  • OnExitStepped mirrors it with VolumeLFO.Disable().

That's the whole loop: gameplay events flip the modulator on and off; Patchwork does the actual audio shaping.

Common patterns

Pattern 1 — Enable() on round start

Drive the modulator from a button so the host can kick the ambient pulse on whenever they like.

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

lfo_button_device := class(creative_device):

    @editable
    AmbientLFO : lfo_modulator_device = lfo_modulator_device{}

    @editable
    StartButton : button_device = button_device{}

    OnBegin<override>()<suspends>:void =
        # Subscribe so pressing the button wakes the LFO.
        StartButton.InteractedWithEvent.Subscribe(OnPressed)

    OnPressed(Agent : agent) : void =
        # InteractedWithEvent hands us a non-optional agent directly.
        AmbientLFO.Enable()

Pattern 2 — Disable() to silence the sweep

Stop the modulation when an objective completes, so the breathing filter settles back to a flat tone.

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

puzzle_solved_device := class(creative_device):

    @editable
    FilterLFO : lfo_modulator_device = lfo_modulator_device{}

    @editable
    SolveTrigger : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        SolveTrigger.TriggeredEvent.Subscribe(OnSolved)

    OnSolved(Agent : ?agent) : void =
        if (Player := Agent?):
            # Puzzle done — stop the eerie sweeping.
            FilterLFO.Disable()

Pattern 3 — Toggle two LFOs at once

One plate can re-shape a whole soundscape by enabling one modulator and disabling another.

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

mood_swap_device := class(creative_device):

    @editable
    CalmLFO : lfo_modulator_device = lfo_modulator_device{}

    @editable
    TenseLFO : lfo_modulator_device = lfo_modulator_device{}

    @editable
    SwapPlate : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        # Begin in the calm mood.
        CalmLFO.Enable()
        TenseLFO.Disable()
        SwapPlate.TriggeredEvent.Subscribe(OnSwap)

    OnSwap(Agent : ?agent) : void =
        if (Player := Agent?):
            # Cross-fade the mood: calm off, tense on.
            CalmLFO.Disable()
            TenseLFO.Enable()

Gotchas

  • No events on the device. The LFO Modulator exposes only Enable and Disable. There is no TriggeredEvent or similar on it — never write LFO.SomethingEvent.Subscribe(...). Always subscribe to a different device (trigger, button, plate) and call the LFO from that handler.
  • You must @editable the field. Calling VolumeLFO.Enable() only compiles if VolumeLFO is a field of your creative_device. A bare local or an unlinked reference gives Unknown identifier / a runtime no-op.
  • Patch the modulation in UEFN, not Verse. Verse can't choose which setting the LFO sweeps, its rate, or its depth — that's all configured on the device and its patch cables. Verse only gates when it runs.
  • The disabled-output-0 history. Older versions set the modulator's output to 0 while disabled, which could snap a patched setting hard. Current versions hold the last value. Still, design so a Disable() settling to a neutral value sounds intentional.
  • Copy/paste can break the device. A pasted LFO may output only 0. If your audio is flat after duplicating, delete and re-place the modulator or restart the session.
  • Unwrap optional agents. trigger_device.TriggeredEvent is listenable(?agent), so its handler gets (Agent : ?agent). Use if (Player := Agent?): before acting. button_device.InteractedWithEvent instead hands a non-optional agent — don't try to unwrap that one with ?.
  • Pushing changes mid-session. When you push UEFN changes to a Live Edit session, Patchwork is briefly inaccessible and keeps looping current audio. Set a mix you're happy with before pushing.

Build your own lesson with lfo_modulator_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 →