Unreal Engine Quartz: Sync Sound and Gameplay to the Beat

Table of Contents

Works in Unreal Engine 5.0 to 5.8 (Blueprints). Updated October 2026.

Quick answer: Quartz is Unreal’s music clock. It plays sounds exactly on a beat or bar and tells your gameplay when each beat happens.

  1. Get QuartzSubsystem > Create New Clock, and save the returned Clock Handle.
  2. On the handle, call Set Beats Per Minute, then Start Clock.
  3. To play a sound on the beat, call Play Quantized on an Audio Component and pass the clock handle and a boundary (for example, the next Bar).
  4. To run gameplay on the beat, call Subscribe to Quantization Event with Beat and bind a custom event.

What Quartz is for

A normal Play Sound starts on the next audio buffer after the call, so sounds triggered from Tick or a timer drift a little off the beat. Quartz schedules the sound on the audio thread, so it starts sample-accurately on the beat you asked for.

You want to…Use
Start a sound or loop exactly on the next beat or barPlay Quantized
Run gameplay (lights, spawns, animation) every beatSubscribe to Quantization Event
Handle several timings in one placeSubscribe to All Quantization Events + Switch on EQuartzCommandQuantization
Change tempo mid-songSet Beats Per Minute on the clock handle

Step 1: Create and start a clock

In your Level Blueprint or a manager actor, on Event BeginPlay:

  1. Add Get QuartzSubsystem, then drag off it and add Create New Clock.
  2. Give it a Clock Name such as MusicClock.
  3. For In Settings, use Make QuartzClockSettings with a Make QuartzTimeSignature (4/4 is the default).
  4. Promote the Return Value to a variable called ClockHandle.
  5. From ClockHandle, call Set Beats Per Minute (for example 120), then Start Clock.

Other actors can find the same clock with Get QuartzSubsystem > Get Handle for Clock and the clock name, so you don’t need to pass the handle around.

Step 2: Play a sound on the beat

  1. Create an Audio Component, for example with Create Sound 2D, and keep a reference to it.
  2. Call Play Quantized on it.
  3. Plug ClockHandle into In Clock Handle.
  4. For In Quantization Boundary, use Make QuartzQuantizationBoundary and set Quantization to Bar or Beat.

The sound now waits for the next bar or beat instead of playing immediately. This is how you start music layers, stingers and drum hits in time.

Play Quantized works with any sound: a Sound Wave, a Sound Cue or a MetaSound.

Step 3: Run gameplay on every beat

  1. From ClockHandle, call Subscribe to Quantization Event.
  2. Set In Quantization Event to Beat.
  3. Drag off On Quantization Event and add a custom event, for example OnBeat.

OnBeat fires on every beat and gives you the Beat and Num Bars counters, which you can use to pulse lights, scale objects or spawn enemies in time with the music.

Common problems

ProblemFix
Nothing playsMake sure Start Clock runs before Play Quantized.
Sounds start lateYou’re using Play Sound or Spawn Sound. Switch to Play Quantized on an Audio Component.
Second actor can’t find the clockUse Get Handle for Clock with the exact same clock name.
Visuals feel slightly behind the audioGameplay events arrive on the game thread a few milliseconds after the audio. That’s fine for visuals. For rhythm-game hit judging, compare input with the song’s playback time instead.

For MIDI-driven timing, we play notes on the audio clock in our MIDI Engine 4 PRO plugin.

FAQ

Can Quartz read MIDI files?

No. Quartz is a clock and a scheduler. It doesn’t load MIDI or note data. For note charts, use a MIDI plugin or Unreal’s Harmonix plugin.

Can I change the tempo while music is playing?

Yes. Call Set Beats Per Minute on the clock handle. Its quantization boundary decides when the change takes effect, for example on the next bar.

Is Quartz good for a rhythm game?

It’s great for starting music and sounds in time. For judging player input you also need the song position and a latency offset. Our rhythm game guide below covers both.

Related tutorials