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 acreative_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@editableexposes a slot in the Details panel; you drag your placed sequencer onto it. Without this field, callingDrums.Enable()would fail with Unknown identifier.@editable FloorPlate : trigger_device— same idea for the trigger plate.TriggeredEventfires when a player steps on,UntriggeredEventwhen 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 inOnBegin.OnPlayerStepOn(Agent : ?agent):void =— alistenable(?agent)event hands us an optional agent. We don't need the player here, just the fact that someone stepped on, so we callDrums.Enable()to start the pattern.OnPlayerStepOff— callsDrums.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 adrum_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()andDisable(). Design the beat in the editor first. Enable/Disablereturnvoidand don't fail. They're plain calls — no[], noif. CallingEnable()on an already-enabled device is harmless.- You MUST declare the
@editablefield. A common beginner error is trying to calldrum_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). ?agenthandlers from triggers.TriggeredEventhands 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 thatbutton_device.InteractedWithEventinstead hands a plainagent, not an option.- Start state matters. If you want the lobby quiet, call
Drums.Disable()inOnBegin— placed devices may be enabled by default in their settings.