Updated November 2026. Written by the Algosyntax team.
Quick answer: adaptive music means the game decides what plays next, and the change lands on the beat. In Unreal Engine 5 you need three things:
- Music cut into sections (intro, loop A, transition, loop B), each a whole number of bars long.
- A clock that knows the beat. Create a Quartz clock at your song’s tempo and start every section with Play Quantized on the next Bar.
- One music manager that owns the clock and the audio. Gameplay only tells it what happened (“combat started”, “area cleared”).
No middleware or C++ needed: all of this works in Blueprints.
Part 1: Prepare the music
Most “my music stutters” problems start here, not in Unreal.
- Pick one tempo and keep it for sections that connect to each other.
- Export each section as its own WAV, starting exactly on the downbeat, with a length of whole bars.
- Keep the reverb tail at the end of each file, after the last bar. Don’t trim it and don’t tick Looping on the wave. Instead, start the next section (or the same loop again) on the bar where the music ends, and let the old sound ring out underneath. That’s how you get loops with natural tails and no click.
- Layers (drums, bass, pads) work the same way: same length, started together, and faded in or out with the action.
Part 2: Keep time with Quartz
Quartz is Unreal’s built-in clock for audio. It starts sounds on an exact beat or bar, which a Delay node or a timer can’t do.
- Get Quartz Subsystem > Create New Clock. Name it “Music”. The settings default to 4/4.
- On the returned clock handle, call Set Beats Per Minute with your song’s tempo, then Start Clock.
- For each section, use an Audio Component’s Play Quantized, pass the clock handle and set the Quantization Boundary to Bar. The sound waits for the next bar line and starts exactly on it.
- Call Subscribe to Quantization Event with Bar to get an event on every bar. That’s your counter.
Part 3: Loop until the player acts
This is the most requested pattern on the forums: loop section A until something happens, finish the phrase, then move to B.
- Keep two variables in the manager: Current Section and Next Section. Set Next Section to A.
- On every bar event, count bars. One bar before the current section ends, play Next Section with Play Quantized on the next bar.
- Gameplay calls Request Section (B), which only changes Next Section. Nothing plays right away.
- When the current loop reaches its end, B starts on the beat. If nothing was requested, A simply plays again.
If you’d rather build this in a graph, a MetaSound can do the same with Trigger inputs and Wave Player nodes, driven from Blueprint with Execute Trigger Parameter and Set Float Parameter for layer volumes. The Harmonix plugin that ships with the engine (off by default, enable it under Edit > Plugins) adds music nodes and a Music Clock component with beat and bar events.
Part 4: Remove the gap between sections
A tiny gap when a section starts usually means the audio is loading from disk at that moment. Open each music Sound Wave and set Loading Behavior Override to Prime on Load, or Retain on Load for short sections you play often. Unreal then has the start of the file ready before it’s needed.
Part 5: Where the music manager lives
- One level, or music that restarts per level: an actor in the level, or a component on the Game State, is enough.
- Music that keeps playing across level loads: create each audio component with Create Sound 2D (it doesn’t play until you call Play Quantized) and tick Persist Across Level Transition, keep the manager in your Game Instance (or a Game Instance Subsystem in C++), and tick Ignore Level Change in the Quartz clock settings.
Either way, give the manager a few simple calls, such as Request Section and Set Intensity, through a Blueprint Interface or event dispatchers. Gameplay code shouldn’t need to know how the music is built.
Part 6: Make the game follow the music
The same bar and beat events can pulse lights, bounce the UI or spawn enemies in time. If your music is MIDI, you can react to the notes themselves. This is what we did in our MIDI Engine 4 PRO plugin.
What about FMOD or Wwise?
Both are audio middleware with adaptive music built in: transitions on the bar, stingers and layers in a visual tool made for composers. They’re a good choice for bigger projects or a dedicated audio person. The cost is an extra tool, an integration and a licence to check (both have free tiers for small projects). Unreal’s built-in tools cover the patterns above without them.
FAQ
Do I need C++?
No. Quartz, Play Quantized and MetaSound parameters all work in Blueprints. C++ is only needed if you want a subsystem.
My Fade In does nothing, or the sound plays at the start.
Untick Auto Activate on the audio component so it doesn’t play on its own, and leave its volume at 1. Fade In already starts from silence.
Can I change tempo during the song?
Quartz can change BPM, but recorded audio won’t speed up with it. Change tempo between sections, or use MIDI with instruments that follow the clock.
How do I sync visuals to the beat?
Subscribe to the Quartz clock’s Beat event and drive your effect from it.