Overview
The song_sync_device is a Patchwork device that helps you synchronize music, visuals, and gameplay so they all follow the same timeline. You combine it with level sequences, MIDI data, and other Patchwork devices (music managers, instrument players, drum sequencers) so that when the music plays, your stage lights, cinematics, and gameplay beats stay locked together.
Reach for it whenever timing matters across multiple systems: a concert stage where the laser show must hit on the downbeat, a rhythm game where damage triggers land on the beat, or a boss arena where attack waves are choreographed to the soundtrack.
Because song_sync_device extends patchwork_device, its Verse surface is intentionally tiny — you mostly configure it in the editor and then turn it on and off from Verse at the right gameplay moment. That's exactly what Enable() and Disable() are for: start the synchronized timeline when the show begins, stop it when the round ends.
API Reference
song_sync_device
Full public surface, resolved verbatim from the live Epic digest (Fortnite.digest.verse). Inherited members are merged from patchwork_device.
song_sync_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 concert trigger. A player steps on a pressure plate at the front of the stage; that starts the Song Sync timeline (so the music and the synced light show begin together). When a separate "end show" button is pressed, we stop the sync.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
# A concert controller: start the synchronized show when a player
# steps on the stage plate, stop it when the end button is pressed.
concert_controller := class(creative_device):
# The Song Sync device that drives the shared music/visual timeline.
@editable
SongSync : song_sync_device = song_sync_device{}
# Pressure plate at the front of the stage that starts the show.
@editable
StartPlate : trigger_device = trigger_device{}
# Button backstage that ends the show.
@editable
EndButton : button_device = button_device{}
OnBegin<override>()<suspends>:void =
# Make sure the timeline is NOT running until a player triggers it.
SongSync.Disable()
# Subscribe our handler methods to the device events.
StartPlate.TriggeredEvent.Subscribe(OnStartStepped)
EndButton.InteractedWithEvent.Subscribe(OnEndPressed)
# Runs when a player steps on the stage plate.
OnStartStepped(Agent : ?agent):void =
if (Player := Agent?):
# Kick off the shared timeline — music + synced visuals begin.
SongSync.Enable()
# Runs when a player presses the end-show button.
OnEndPressed(Agent : agent):void =
# Stop the synchronized timeline for everyone.
SongSync.Disable()
Line by line:
- The three
@editablefields let you drop the actual placed devices into the slots in the UEFN Details panel.SongSyncis declared as asong_sync_deviceso we can call its real methods. - In
OnBegin,SongSync.Disable()guarantees the show starts in a clean, stopped state. StartPlate.TriggeredEvent.Subscribe(OnStartStepped)wires the plate's event to our method. A trigger hands a?agent(an optional agent), so the handler signature is(Agent : ?agent).EndButton.InteractedWithEvent.Subscribe(OnEndPressed)wires the button. The button hands a plainagent, so that handler takes(Agent : agent).OnStartSteppedunwraps the optional withif (Player := Agent?):before doing work, then callsSongSync.Enable()to start the synchronized timeline.OnEndPressedcallsSongSync.Disable()to stop it.
Common patterns
Auto-start the show on map load
Sometimes you want the music timeline running from the moment the round begins — no player input needed. Just enable it in OnBegin.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
auto_concert := class(creative_device):
@editable
SongSync : song_sync_device = song_sync_device{}
OnBegin<override>()<suspends>:void =
# Start the synchronized music/visual timeline immediately.
SongSync.Enable()
Toggle the timeline on a repeating cue
You can drive Enable/Disable from any device event. Here a single button toggles the show on and off, tracking state with a var.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
stage_toggle := class(creative_device):
@editable
SongSync : song_sync_device = song_sync_device{}
@editable
ToggleButton : button_device = button_device{}
# Tracks whether the synchronized timeline is currently running.
var IsRunning : logic = false
OnBegin<override>()<suspends>:void =
SongSync.Disable()
ToggleButton.InteractedWithEvent.Subscribe(OnToggle)
OnToggle(Agent : agent):void =
if (IsRunning?):
SongSync.Disable()
set IsRunning = false
else:
SongSync.Enable()
set IsRunning = true
Restart the timeline cleanly
To "restart" the synced show, Disable then Enable. This is handy at the start of each wave or round.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
show_restarter := class(creative_device):
@editable
SongSync : song_sync_device = song_sync_device{}
@editable
RestartPlate : trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void =
RestartPlate.TriggeredEvent.Subscribe(OnRestart)
OnRestart(Agent : ?agent):void =
# Stop, then immediately start so the timeline begins from a known point.
SongSync.Disable()
SongSync.Enable()
Gotchas
- The Verse surface is tiny on purpose.
song_sync_deviceonly exposesEnable()andDisable()from itspatchwork_devicebase. The actual tempo, key, and timeline wiring is configured in the editor and via connected Patchwork devices (music manager, sequencers, etc.). Verse is your on/off switch for the shared clock — don't expect Verse methods to set the BPM. - You must declare the device as an
@editablefield. Callingsong_sync_device{}.Enable()on a bare literal won't talk to your placed device. Declare@editable SongSync : song_sync_device = song_sync_device{}and assign the real device in the Details panel. - Trigger vs button event signatures differ.
trigger_device.TriggeredEventhands you?agent(optional) — unwrap withif (Player := Agent?):.button_device.InteractedWithEventhands you a plainagent. Using the wrong handler signature is a compile error. - Sync is shared —
Disable()stops it for everyone. These methods affect the device's global timeline, not a per-player one. If you Disable mid-show, every connected Patchwork device that follows that timeline stops too. - Order matters for a clean start. Calling
Disable()inOnBeginbefore any player triggersEnable()avoids the music being half-way through its timeline when the show is supposed to begin. To restart, callDisable()thenEnable(). - Don't add
using {…}mentally and forget it in the file —song_sync_devicelives in the Patchwork module, so you need BOTHusing { /Fortnite.com/Devices }(forcreative_device, triggers, buttons) ANDusing { /Fortnite.com/Devices/Patchwork }(for the Patchwork device classes), or the compiler reports “Unknown identifiersong_sync_device”.