Reference Devices

drum_sequencer_device: Beats That Start and Stop on Cue

The drum sequencer device is a Patchwork instrument that plays a drum pattern you author in UEFN. From Verse you don't write the beats — you control WHEN they play by enabling and disabling the device. This article shows how to wire a drum loop into a real game: silent until a player steps on a plate, pounding while the round is live.

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 Knotdrum_sequencer_device in ~90 seconds.

Overview

The drum_sequencer_device is part of Fortnite's Patchwork music system. In the UEFN editor you place it, author a drum pattern (kick, snare, hat steps), and route its note output to a drum_player_device so the pattern actually makes sound. Your beat lives in the editor — Verse's job is timing the playback, not composing it.

That's why its Verse surface is intentionally tiny: it inherits two methods from patchwork_device, Enable() and Disable(). A disabled sequencer is silent; an enabled one runs its pattern. That's the whole game loop you need for music that reacts to play:

  • A dance-floor objective: the beat only plays while players stand on the floor.
  • A boss arena: drums kick in when the fight starts, cut out when the boss dies.
  • A rhythm challenge: enable the loop at round start, disable it at round end.

Reach for the drum sequencer whenever you want a looping percussion bed that turns on and off with gameplay. For one-shot stingers or melodic lines you'd use other Patchwork devices (note_sequencer_device, omega_synthesizer_device), but they share the same Enable/Disable control pattern, so what you learn here transfers.

API Reference

drum_sequencer_device

Create drum note patterns for Patchwork devices.

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

drum_sequencer_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

Let's build a dance-floor objective: a trigger plate at the center of the floor. When a player steps on, the drum sequencer turns on and the beat plays. When they step off, the music cuts out. We start with the beat OFF so the lobby is quiet.

In the editor: place a drum_sequencer_device, author a drum pattern on it, route its output to a drum_player_device so it's audible, and place a trigger_device on the dance floor. Then drop in this Verse device and assign all three in the Details panel.

# Dance-floor beat: drums play only while a player stands on the plate.
dance_floor_device := class(creative_device):

    # The drum sequencer holds the authored pattern; we toggle its playback.
    @editable
    Drums : drum_sequencer_device = drum_sequencer_device{}

    # The plate players step on to start the beat.
    @editable
    FloorPlate : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        # Start silent: the lobby shouldn't have the beat going yet.
        Drums.Disable()

        # React to players stepping on and off the plate.
        FloorPlate.TriggeredEvent.Subscribe(OnPlayerStepOn)
        FloorPlate.UntriggeredEvent.Subscribe(OnPlayerStepOff)

    # A player stepped on the plate -> turn the beat on.
    OnPlayerStepOn(Agent : ?agent):void =
        Drums.Enable()

    # The plate is empty again -> cut the beat.
    OnPlayerStepOff(Agent : ?agent):void =
        Drums.Disable()

Line by line:

  • dance_floor_device := class(creative_device): — every Verse device that controls placed devices is a creative_device. This is the class UEFN will let you drop into your level.
  • @editable Drums : drum_sequencer_device = drum_sequencer_device{} — this field is what makes the sequencer reachable from Verse. The @editable exposes a slot in the Details panel; you drag your placed sequencer onto it. Without this field, calling Drums.Enable() would fail with Unknown identifier.
  • @editable FloorPlate : trigger_device — same idea for the trigger plate. TriggeredEvent fires when a player steps on, UntriggeredEvent when they leave.
  • OnBegin<override>()<suspends>:void = — runs once when the game starts. All setup goes here.
  • Drums.Disable() — the device's real method. We call it immediately so the beat is OFF at the start.
  • FloorPlate.TriggeredEvent.Subscribe(OnPlayerStepOn) — wire the step-on event to our handler method. Event handlers are methods at class scope, subscribed in OnBegin.
  • OnPlayerStepOn(Agent : ?agent):void = — a listenable(?agent) event hands us an optional agent. We don't need the player here, just the fact that someone stepped on, so we call Drums.Enable() to start the pattern.
  • OnPlayerStepOff — calls Drums.Disable() to silence the loop.

The result: a living dance floor where the music breathes with the players.

Common patterns

Beat on for the whole round

Kick the drums in at round start and never touch them again — a constant musical bed for the match.

# Beat plays continuously once the round begins.
round_music_device := class(creative_device):

    @editable
    Drums : drum_sequencer_device = drum_sequencer_device{}

    OnBegin<override>()<suspends>:void =
        # Round is live -> start the loop and leave it running.
        Drums.Enable()

Drums driven by a button (start / stop DJ booth)

Use a button to toggle the beat on and off — a DJ booth players can mess with.

# Two buttons: one starts the beat, one stops it.
dj_booth_device := class(creative_device):

    @editable
    Drums : drum_sequencer_device = drum_sequencer_device{}

    @editable
    PlayButton : button_device = button_device{}

    @editable
    StopButton : button_device = button_device{}

    OnBegin<override>()<suspends>:void =
        Drums.Disable()
        PlayButton.InteractedWithEvent.Subscribe(OnPlay)
        StopButton.InteractedWithEvent.Subscribe(OnStop)

    OnPlay(Agent : agent):void =
        Drums.Enable()

    OnStop(Agent : agent):void =
        Drums.Disable()

Boss arena: beat tracks the fight

Start the drums when the fight trigger fires, and cut them when the boss-defeat trigger fires.

# Drums pound during the boss fight, then cut on victory.
boss_arena_device := class(creative_device):

    @editable
    Drums : drum_sequencer_device = drum_sequencer_device{}

    @editable
    FightStart : trigger_device = trigger_device{}

    @editable
    BossDefeated : trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void =
        Drums.Disable()
        FightStart.TriggeredEvent.Subscribe(OnFightStart)
        BossDefeated.TriggeredEvent.Subscribe(OnBossDefeated)

    OnFightStart(Agent : ?agent):void =
        Drums.Enable()

    OnBossDefeated(Agent : ?agent):void =
        Drums.Disable()

Gotchas

  • No sound without a player device. The drum sequencer only outputs note data. If you Enable() it but hear nothing, you forgot to route its output to a drum_player_device (or another Patchwork sound device) in the editor. Verse can't fix an unwired audio chain.
  • The pattern is authored in UEFN, not Verse. There's no API to set steps, tempo, or instruments from Verse. Your only levers are Enable() and Disable(). Design the beat in the editor first.
  • Enable/Disable return void and don't fail. They're plain calls — no [], no if. Calling Enable() on an already-enabled device is harmless.
  • You MUST declare the @editable field. A common beginner error is trying to call drum_sequencer_device.Enable() directly. You can only call methods on a field you've exposed and assigned in the Details panel. Forgetting to drag the placed device onto that slot means the call silently does nothing (or errors at runtime).
  • ?agent handlers from triggers. TriggeredEvent hands you (Agent : ?agent). If you need the actual player (e.g. to grant something), unwrap it: if (Player := Agent?):. For pure music toggling you can ignore the agent entirely, as shown above. Note that button_device.InteractedWithEvent instead hands a plain agent, not an option.
  • Start state matters. If you want the lobby quiet, call Drums.Disable() in OnBegin — placed devices may be enabled by default in their settings.

Guides & scripts that use drum_sequencer_device

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

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