A dialogue blip in most games is timed against the text reveal. The character appears, the blip plays, the next character appears, the next blip plays. The only timing constraint is that the blip lands close enough to the reveal that the two feel like one event.
A dialogue blip in a music-driven game has a second constraint on top of that. The blip also has to land on or near the beat, because the player's attention is already locked to the musical grid. A blip that plays on the text reveal but lands 80 milliseconds off the beat reads as a mistake, even though the text reveal itself is correct.
The two constraints do not always agree. The text reveal is driven by a character rate that is usually fixed at 30 to 60 characters per second. The beat is driven by the music's tempo, which is typically 90 to 180 BPM. At 120 BPM, a beat lasts 500 milliseconds. At 40 characters per second, a character is revealed every 25 milliseconds. Twenty characters appear between each beat, and the blip cannot fire on all of them if it also has to fire on the beat.
This article is about how to reconcile the two. It covers the quantization grids that most music-driven games use, the lookahead scheduling pattern that makes grid-aligned blips possible without delay, the latency budget that decides whether a blip can stay musical, and the specific cases where ignoring the grid is the better choice. The typewriter blip guide covers the text-reveal side; this article is about the music side.
What quantization grid do music-driven games use for dialogue blips?
The quantization grid is the set of time positions that the blip is allowed to occupy. A game that quantizes to the quarter note allows blips only on beats. A game that quantizes to the eighth note allows them on beats and on the off-beat between beats. The grid determines how musical the blips feel and how much freedom the designer has.
The grids that work for dialogue blips are coarser than the grids that work for musical notes. A sixteenth-note grid at 120 BPM places a slot every 125 milliseconds, which is close to the character reveal interval at a fast text speed. The result is that almost every blip lands on a slot, and the grid stops being a musical constraint and starts being a coincidence.
| Grid | At 120 BPM | Blips per second | Fit for dialogue |
|---|---|---|---|
| Quarter note | 500 ms | 2 | Too sparse, one blip per beat |
| Eighth note | 250 ms | 4 | Good for slow text, one blip per half-beat |
| Eighth-note triplet | ~167 ms | 6 | Good compromise for most text speeds |
| Sixteenth note | 125 ms | 8 | Too dense, close to reveal interval |
| Sixteenth-note triplet | ~83 ms | 12 | Only for very fast text speeds |
The eighth-note triplet is the grid that most music-driven games converge on for dialogue. It is dense enough that a blip can fire on every word of a typical line without the player waiting for a slot, and it is sparse enough that the blips still feel like they are part of the music rather than a continuous stream. The grid gives the designer six possible positions per second at 120 BPM, which is more than the text reveal typically needs.
The quarter note is the grid for a game where the dialogue is sparse and each line is a single utterance, such as a rhythm game where characters speak one phrase per beat. The sixteenth note is the grid for a game where the text is very fast and the music is very slow, so the two intervals stay far apart. Neither of those is the common case.
Why does scheduling on the frame loop make blips late?
The most common mistake in music-driven dialogue is scheduling the blip on the frame loop. The game checks every frame whether a blip should fire, and if it should, it plays the sound immediately. The result is that the blip lands on the nearest frame boundary, not on the musical grid.
At 60 frames per second, a frame lasts 16.7 milliseconds. A blip scheduled on the frame loop can be up to 16.7 milliseconds late relative to the grid position. That sounds small, but the perceptual threshold guide notes that the ear is sensitive to timing offsets of 10 to 20 milliseconds when the sound is paired with a visual event. A 16.7-millisecond late blip is within the range where the player starts to notice that the sound and the visual do not quite agree.
The problem compounds at lower frame rates. A game running at 30 frames per second has a 33.3-millisecond frame interval, which is well above the perceptual threshold. A game running at 30 frames per second and quantizing to the eighth-note triplet at 120 BPM has a grid interval of 167 milliseconds and a frame interval of 33.3 milliseconds, which means the blip can be off the grid by up to 20 percent of the slot.
The fix is to schedule the blip on the audio clock rather
than the frame loop. The Web Audio API exposes
AudioContext.currentTime, which advances
independently of the frame loop and is accurate to a
sample. The
coin sound scheduling guide
covers the scheduling pattern in the context of a
non-musical sound; the same pattern applies to a
music-driven blip, with the grid position as the target
time instead of the event time.
The lookahead scheduling pattern that makes grid-aligned blips work
The lookahead pattern separates the decision to schedule a blip from the moment the blip is heard. A scheduler runs at a fixed interval — often every 25 to 50 milliseconds — and schedules any blips that need to play in the next 100 to 200 milliseconds. The blips are scheduled on the audio clock, so the main thread's jitter does not affect when they are heard.
The scheduler needs to know the grid position for the next blip. The grid position is computed from the music's current playback position, the tempo, and the grid resolution. If the music is playing at 120 BPM and the grid is the eighth-note triplet, the next grid position is 167 milliseconds after the current one, and the scheduler schedules the blip at that time on the audio clock.
class GridBlipScheduler {
constructor(ctx, bpm, gridDiv) {
this.ctx = ctx;
this.secondsPerBeat = 60 / bpm;
this.gridInterval = this.secondsPerBeat / gridDiv;
this.lastScheduledGrid = 0;
}
// Called every 25-50ms from the game loop
tick(textRevealRate) {
const now = this.ctx.currentTime;
const lookahead = 0.2; // 200ms
// Find the next grid positions that fall within lookahead
let nextGrid = this.lastScheduledGrid + this.gridInterval;
while (nextGrid < now + lookahead) {
// Decide whether this grid slot should fire a blip
// based on the text reveal rate and the line length
if (this.shouldFireOnSlot(nextGrid, textRevealRate)) {
this.scheduleBlip(nextGrid);
}
nextGrid += this.gridInterval;
}
this.lastScheduledGrid = nextGrid - this.gridInterval;
}
scheduleBlip(time) {
const osc = this.ctx.createOscillator();
const gain = this.ctx.createGain();
osc.frequency.value = 1000;
gain.gain.setValueAtTime(0, time);
gain.gain.linearRampToValueAtTime(0.5, time + 0.002);
gain.gain.exponentialRampToValueAtTime(0.001, time + 0.04);
osc.connect(gain);
gain.connect(this.ctx.destination);
osc.start(time);
osc.stop(time + 0.05);
}
}
The shouldFireOnSlot method is where the
dialogue design lives. It decides whether the current grid
slot corresponds to a character reveal. If the text speed
is 40 characters per second and the grid interval is 167
milliseconds, then roughly 6.7 characters are revealed
between grid slots. The method can fire a blip on every
slot, on every other slot, or on a slot only when a word
boundary falls within it.
The lookahead value of 200 milliseconds is a balance. A shorter lookahead means the scheduler runs more often and the grid positions are computed with more precision. A longer lookahead means the scheduler runs less often and the main thread has more headroom, but a blip scheduled too far in advance cannot be cancelled if the line ends early. The 100 to 200 millisecond range is the standard for music-driven games that schedule on the audio clock.
The variation system guide notes that scheduled audio on the Web Audio clock is sample-accurate, which is why the lookahead pattern produces blips that land exactly on the grid rather than near it. That accuracy is what makes the blips feel musical instead of coincidental.
What latency budget does a music-driven blip have?
The latency budget is the total time between the moment the game decides to schedule a blip and the moment the player hears it. The budget is tighter for a music-driven game than for a standard dialogue system, because the blip has to land on a grid position that the player is actively tracking.
The budget is made up of three components. The first is the scheduler's lookahead, which is how far in advance the blip is scheduled. The second is the audio system's latency, which is how long the audio system takes to produce the sound after the scheduled time. The third is the device's output latency, which is how long the speaker or headphone takes to produce the sound after the audio system delivers it.
| Component | Typical value | Notes |
|---|---|---|
| Scheduler lookahead | 100–200 ms | Not part of perceived latency if scheduling is accurate |
| Audio system latency | 10–30 ms | Depends on the buffer size and the audio backend |
| Output latency (wired) | 5–15 ms | Headphone jack or wired speakers |
| Output latency (Bluetooth) | 150–250 ms | Codec-dependent; see the SBC/aptX table in the handheld guide |
The wired case is the one that works. Audio system latency and output latency together are 15 to 45 milliseconds, which is within the perceptual threshold for music-driven feedback. A blip that is scheduled on the grid and played through wired output lands within 45 milliseconds of the grid position, which is close enough that the player reads it as musical.
The Bluetooth case does not work. A 150 to 250 millisecond output latency means the blip lands a quarter to a half second after the grid position, which is a full beat at 120 BPM. The player hears the blip as a separate event from the beat, not as part of it. The handheld audio guide covers the Bluetooth codec table; the specific note here is that a music-driven game should tell the player to use wired audio, or compensate for the Bluetooth latency by scheduling blips earlier.
The compensation approach is used by some rhythm games: the game measures the Bluetooth latency at the start of the session and offsets the scheduling target by that amount, so the blip is scheduled earlier and arrives on the grid when the player hears it. The measurement is not perfect, but it moves the blip from a quarter-second late to within the perceptual threshold.
When should a dialogue blip ignore the grid entirely?
A music-driven game has dialogue that is not always part of the music. A cutscene, a tutorial message, a menu confirmation — these are cases where the blip is tied to the text reveal and not to the beat, and forcing them onto the grid produces a result that is worse than the non-musical version.
The design decision is whether the dialogue is part of the musical experience. A line that is spoken by a character in the middle of a song, where the player is actively tapping to the beat and reading the line simultaneously, benefits from the grid. A line that appears during a pause in the music, or during a UI transition, does not.
The specific cases where the grid should be ignored:
Cutscenes and narrative scenes. When the music is a background layer rather than the focus, the dialogue blip should follow the text reveal. The grid is a constraint from a different game state, and applying it to a cutscene produces a blip that feels out of place.
UI and menu sounds. A menu confirmation is an interface event, not a musical event. The grid does not apply, and forcing it does produces blips that are late to the action and not on the beat. The UI sound design guide covers the timing requirements for interface sounds; those requirements take priority over the grid.
Critical feedback. An error sound, a warning, a low-health alarm. These are sounds that need to play when the event happens, not when the next grid slot arrives. A low-health alarm that waits for the next beat is a low-health alarm that fails at its only job.
The rule is that the grid applies to sounds that are part of the music. Sounds that are part of the interface, the narrative, or the critical feedback follow their own timing requirements. A music-driven game has both kinds of sounds, and the design has to distinguish them.
What does a grid-synced dialogue blip sound like in context?
The test for a grid-synced blip is whether the player notices that the blips are landing on the beat, and whether they notice it in a good way or a bad way. A blip that lands on the beat without the player thinking about it is working. A blip that lands on the beat so consistently that it feels mechanical is not.
The first test is the beat-matching test. Play a scene with the dialogue active and the music at a normal volume. Tap along to the beat and listen for whether the blips land on the same taps. If they do, the grid is working. If the blips occasionally land between beats, the scheduler is missing the grid or the grid is not being applied.
The second test is the musicality test. Play the scene and ask whether the blips sound like part of the music or like a sound effect layered on top. A grid-synced blip is a rhythmic element; a non-grid blip is a text feedback element. The two feel different, and the player's perception of the scene changes depending on which one is present.
The third test is the variation test. Play the scene for thirty seconds and ask whether the blips become predictable. A blip that plays on every grid slot is predictable. A blip that plays on some slots and not others is less predictable. The variation guide covers the per-blip variation; the grid-synced version also needs variation at the slot level, so that the blips do not form a predictable pattern on the beat.
The fourth test is the transition test. Play a scene that moves from a music-driven state to a non-musical state — a cutscene, a menu, a narrative moment. The blips should transition from grid-synced to text-reveal-synced without an audible break. A blip that is still trying to land on the beat after the music has stopped sounds wrong, and a blip that ignores the grid during the music sounds wrong.
Sync voice blips with the beat is not a matter of making every blip land exactly on a grid slot. It is a matter of deciding which sounds belong to the music and which do not, and applying the right timing constraint to each category. The music-driven blip follows the grid; the narrative and interface blips follow their own timing. The voice-blip mixing guide covers the level and frequency side of the same distinction; this article is about the temporal side.
The lookahead scheduler and the audio clock are the technical foundation. The grid is the musical constraint. The decision of which blips belong to which category is the design constraint, and it is the one that determines whether the result sounds like a game with music or a game where the music and the dialogue are happening to the same tempo.
Generate a Grid-Synced Blip Set
Open the SfxMaker blip generator and create three short blips at different pitches — one for the protagonist, one for a supporting character, and one for a system voice. Keep each under 50 milliseconds so the scheduler can fire multiple blips on adjacent grid slots without overlap.
Open Blip Sound Generator →