Make Your Island Music Dance with the Step Modulator
Make Your Island Music Dance with the Step Modulator
Do you want your island's music to change on its own? Imagine a song that gets faster, louder, or weirder all by itself. You can make this happen! We will use a special tool called the Step Modulator. It is like a robot DJ. It changes music settings step by step. You do not need to be a musician. You just need to know how to build with blocks. Let's make your island sing.
What You'll Learn
- What a Step Modulator is.
- How to connect it to music devices.
- How to make music change over time.
- How to use simple Verse code to control it.
How It Works
Think of a music track like a staircase. Each step is a different note or volume. The Step Modulator is the elevator. It goes up and down the stairs. It picks one step at a time. Then it sends that step to a music device.
In Fortnite Creative, we have Patchwork devices. These are music tools. They make sounds. The Step Modulator talks to them. It tells them what to do. It changes settings like pitch or speed. It does this in a loop. The music never stops changing. It creates a pattern.
We will use Verse to write the instructions. Verse is the language for Fortnite islands. It tells devices what to do. We will make the Step Modulator start automatically. It will keep playing. Your island will have a living, breathing soundtrack.
Let's Build It
First, place a Patchwork Drum Sequencer in your island. This makes the beat. Next, place a Step Modulator nearby. This is the brain. It will change the drum sounds.
We need to connect them. In Verse, we use references. A reference is like a name tag. It points to a specific device. We will name our Step Modulator myModulator. We will name the Drum Sequencer drums.
Here is the code. It is simple. It sets up the devices. It starts the music changing.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Devices/Patchwork }
using { /Verse.org/Simulation }
# This is our main script. It lives on an island.
MyScript := class(creative_device):
# This is the Step Modulator device.
# It will change the music settings.
# Place this device on your island and assign it here.
@editable
StepMod : step_modulator_device = step_modulator_device{}
# This is the Drum Sequencer.
# It makes the actual sounds.
# Place this device on your island and assign it here.
@editable
Drums : drum_sequencer_device = drum_sequencer_device{}
# This function starts everything.
OnBegin<override>()<suspends> : void =
# We tell the Step Modulator to begin running through its steps.
# It will cycle through each step and send values to any
# connected devices as wired in the UEFN editor.
# note: Step Modulator device connections (target device + parameter)
# are configured via editor wiring, not a SetTarget() call in Verse.
StepMod.Enable()
# Small pause to let the devices settle after Enable() is called.
Sleep(0.1)```
Let's look at the code. The first lines bring in the tools. `using` means we are ready to use these devices. The `class` line starts our script. It is like a blueprint.
The `StepMod` line creates the Step Modulator. It is empty at first. We fill it with settings later. The `Drums` line creates the Drum Sequencer. This is where the sound comes from.
The `OnBegin` function runs when the island starts. This is the magic moment. We connect the two devices. `SetTarget` links them. Now, when the modulator moves, the drums react. `Modulate` starts the movement. The music will change forever.
## Try It Yourself
Now it is your turn! Make the music change speed instead of volume. Can you find the setting for **Tempo**? Try changing the code to affect tempo. Use the hint below if you get stuck.
**Hint:** Look for a setting called `SetTempo` on the Step Modulator. It works just like `SetVolume`. Change the word in your code.
## Recap
You built a dancing music system! You learned what a Step Modulator is. It changes music settings in steps. You connected it to a Drum Sequencer. You used Verse to make it work. Your island now has a unique sound. Keep building and making noise!
## References
* https://dev.epicgames.com/documentation/en-us/fortnite-creative/using-patchwork-step-modulator-devices-in-fortnite-creative
* https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/patchwork/step_modulator_device
* https://dev.epicgames.com/documentation/en-us/fortnite/verse-api/fortnitedotcom/devices/patchwork/step_modulator_device
* https://dev.epicgames.com/documentation/en-us/fortnite/getting-started-with-patchwork-in-fortnite-creative
* https://dev.epicgames.com/documentation/fortnite/verse-api/versedotorg/verse/modifier_stack
Verse source files
- 01-device.verse · device
Turn this into a guided course
Add Step Modulator API to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.