Play now

How Street Scene synthesizes its engine sounds

There are no engine recordings in Street Scene. Every car's sound is built live in your browser from how its engine actually fires: each cylinder's exhaust pulse is timed by the firing order, delayed and weakened by the length of its own exhaust pipe, summed into a pulse train on the audio thread, and then played through a silencer that is itself synthesized. The idea comes from Ange Yaghi's open source Engine Simulator. This post walks through how it works, what went wrong along the way, and lets you hear clips rendered by the game's own audio code.

Two cycles of exhaust pressure at 6,000 rpm for a narrow angle six: a glowing pulse for each cylinder in firing order 1 5 3 6 2 4, with the far row's pulses arriving late and weaker

Why not just record real engines?

Recorded engines are the usual approach, and for good reason: a well recorded engine sounds like that engine. They did not fit this game, for four reasons.

  • Every engine needs a voice. Each car has engine swaps in the garage, so the two cars available today already carry nine different engines between them, from a four cylinder to a pushrod V8. Each would need its own recording session.
  • Any rpm at any load. Samples are recorded at a handful of rpm points and crossfaded, and they only cover the throttle positions someone recorded. A synthesized engine is correct at 3,137 rpm with the pedal at 40 percent by construction.
  • The details are behaviour, not audio files. A turbo spooling, a valve venting when you lift, the rev limiter cutting, a pop on the overrun: each is a model that reacts to what you do, not a one-shot sample.
  • The download. The game is a web page, and every megabyte is load time. The engine voices add no audio files at all. They are code, and the silencer responses are rendered on your machine when a car loads.

The first version was synthesized too, but the wrong way: an oscillator at the firing frequency, with a recipe per layout for its character, a "bank to bank beat" for a V6 and a "cross-plane beat" for a V8. Those were descriptions of a sound, not its cause, and they sounded like it. In October 2026 I replaced it with the model below.

What makes an engine sound like itself?

Engine Simulator, by Ange Yaghi (MIT licensed), simulates the gas in a running engine and turns it into sound. Reading its source showed me the part that matters for the ear: an engine's character comes mostly from when and how strongly each cylinder's exhaust pulse reaches the tailpipe, not from the shape of any one pulse. Street Scene keeps Engine Simulator's structure (the pulse timing, the delay and loss along each pipe, the tailpipe chain and the convolution with a silencer response) and replaces its gas simulation with one shaped pulse per combustion event. That is cheap enough to run several voices at once in a browser.

A four stroke engine fires each cylinder once every two crank turns, so it fires rpm ÷ 60 × cylinders ÷ 2 times a second: 200 for a four at 6,000 rpm, 300 for a six. That is the note. The personality is in how evenly those firings arrive.

How is one engine voice built?

1. The firing order

Every layout in the game has its real firing order and knows which bank each cylinder sits on: 1-3-4-2 for an inline four, 1-2-4-5-3 for a five, 1-5-3-6-2-4 for a six, 1-8-7-2-6-5-4-3 for a cross-plane V8. In an even firing engine cylinder k of n fires at k/n of the 720° cycle.

2. One exhaust pulse

Each firing makes a pulse of pressure: a sharp rise as the exhaust valve opens (the blowdown), an exponential decay through the exhaust stroke, and a small dip as the pipe scavenges. The shape is stored as a wavetable of 8,192 points over the engine cycle, so pulses get shorter in time as the revs rise, as real ones do. A turbo between the engine and the pipe widens the rise and smooths the dip away, which is why turbo engines sound rounder. Bigger cylinders get slightly longer, stronger pulses.

3. The path to the tailpipe

This is the heart of it. Each cylinder's pulse travels its own header pipe to the collector. A longer pipe delivers the pulse later, at the speed of sound (343 m/s), and weaker, falling with the square of its length, which is Engine Simulator's rule. The crank fires evenly, but if the paths differ the pulse train that reaches the tailpipe does not, and the ear hears that unevenness as rumble, growl or warble.

The Wendt Strom's narrow-angle V6 shows it best. Its six cylinders share one head in two staggered rows, and the firing order 1-5-3-6-2-4 fires the three near-row cylinders and then the three far-row ones. The far row's pipes reach around the V and run longer, so their pulses arrive 1.0 to 1.2 milliseconds late at about two thirds of the level. An even six repeats its pattern six times a cycle. This one repeats once, and that slow beat under the even note is its hollow growl.

Exhaust pulse trains of an even inline six and of the narrow-angle V6 Two cycles of exhaust pressure at 6,000 rpm. Top: six equal pulses per cycle. Bottom: the narrow-angle V6 firing 1-5-3-6-2-4, where cylinders 6, 2 and 4 on the far row arrive about a millisecond late and at about two thirds of the level, so the train repeats once per cycle instead of six times. Six even pulses: every cylinder the same path 153624153624 The narrow-angle V6: far row 6, 2, 4 late and weaker 153624153624 one cycle: two crank turns the next cycle
Two cycles of exhaust pressure at 6,000 rpm, drawn from the game's own program for the narrow-angle V6. The far row's delay and level are to scale.

4. The tailpipe

The summed train then goes through Engine Simulator's per-pipe chain: a band limit around 1.5 to 2.6 kHz depending on the silencer, a delay that wanders a little (the pipe is not perfectly still), a DC block, and a mix of the pressure's derivative with the pressure itself breathing with low passed turbulence noise. The derivative carries the tone, because a pipe end radiates changes in pressure rather than pressure. The noise makes it sound like moving air.

Every voice renders two tailpipe tips, left and right. On a car with twin exhausts each bank gets its own pipe. A single exhaust feeds the same train to both tips with their own turbulence and a 0.3 millisecond path difference, so it sounds as wide as a twin pipe car instead of a point in the middle of your head.

5. The silencer, as a convolution

A silencer is a filter with memory: pipes and chambers ring at their own frequencies. Engine Simulator convolves its output with recorded impulse responses. Street Scene renders its own instead, so nothing is downloaded and nothing of theirs is redistributed. Each response is a direct path, the pipe column's half wave modes (the first at 343 ÷ twice the system length: about 61 Hz for the quiet silencer's 2.8 m, 101 Hz for the straight-through's 1.7 m), a chamber resonance, a short ring at the tip for the sport and straight-through systems, and a diffuse noise tail. The browser's ConvolverNode applies it natively.

Here is the difference it makes. The first clip is the raw output of the synth for the Wendt Strom, the two tips before anything else. The second is the same pull through the whole voice: silencer, intake, valvetrain and the mix.

The raw pulse train only: the narrow-angle V6 before its silencer. Buzzy and thin, but the growl's beat is already there. Turned up to roughly the level of the next clip.
The Wendt Strom's 3.2 narrow-angle V6, a dyno pull from idle to its 6,800 rpm limiter and a lift. Listen for the growl under the note in the middle of the pull, and the crackle after the lift.

6. Intake, valvetrain and turbo

Beside the exhaust the synth renders the intake, a softer pulse half a cycle away that grows with the throttle and goes through a band pass standing in for the intake trumpet, and a valvetrain tick that is heard mostly at idle. Turbo engines add a whistle that climbs from 1.6 kHz with the turbine's speed and spools with lag, a valve that vents or recirculates when you lift at boost, and on some engines the rush of the intake, the flutter of the compressor and the rattle of the wastegate. Every one of those is set per engine in the car's data, and absent means none.

7. Throttle, load, the limiter and the overrun

A leveler holds the raw voice steady from idle to the redline, and loudness is set on top from the pedal, the revs and the distance. Off the throttle it is only a little quieter, because the overrun is where the silencer and the pops are heard. A gear change cuts the load, and the limiter drops firings at random. Pops come from a small model: the exhaust heats up over seconds of hard driving, a lift from above 45 percent of the redline leaves fuel in the pipe that burns off over about a second, and while both are high there is a chance of a bang or a burst of crackles. The same event flashes a flame at that tailpipe, so what you see and hear agree.

Why run it in an AudioWorklet?

An AudioWorklet runs JavaScript on the browser's audio thread, away from the frame the game is drawing: a late video frame is a stutter, a late audio buffer is a click. The synth is pure TypeScript with no Web Audio in it, so the same code runs in the worklet and headless in Node for the tests. The game ramps its parameters every frame (rpm, load, the shift cut, the limiter) and gets four outputs back: the exhaust with a channel per tip, the intake, the valvetrain and the pops. The convolution and filters are native Web Audio nodes on the main thread's side.

It is cheap. Measured headless, one voice takes 5 to 13 milliseconds of CPU per second of audio, about 1 percent of a core. Rivals run a lighter program with half the silencer response and no intake or valvetrain detail, and each voice gets its own noise seed so rivals never phase lock with the player. I have not yet measured it on a phone.

What does each engine sound like, and why?

Each clip below is a dyno pull in the garage: idle, the pedal down, the revs climbing to the limiter, a moment bouncing off it, then a lift. They all went through the same chain at the same gain, so their loudness relative to each other is the game's.

Inline four

The Nakaya Grove's stock 2.4 twin cam four through its quiet silencer, to a 6,500 rpm limiter. An even, plain note: four pulses evenly spaced, rounded off by a big silencer box.

Four cylinders firing every 180° of crank rotation, all on one pipe. There is nothing uneven to hear, so the character is in the silencer: the quiet box has the longest system and the lowest band limit of the three.

Inline four with a cam changeover

The Grove's 2.4 Long Stroke Four swap, to 7,800 rpm. Just before the four second mark it passes 5,000 rpm and switches to its high-lift cam: the note turns harder and louder.

Some engines switch to a second, high-lift camshaft profile at a set rpm, and what you hear is a step. Above 5,000 rpm with the pedal down, this one's pulses get a sharper rise and a shorter decay from a second wavetable, the band limit opens by 60 percent, the voice gets 30 percent louder after the leveler (which would otherwise iron the step flat) and the intake swells. It lets go 150 rpm lower, so revs hovering at the switch do not chatter.

Turbocharged inline five

The Wendt Strom's 2.5 Five Turbo swap: a top mount turbo, a straight-through exhaust and an open wastegate pipe. Listen for the five's warble under the whistle, and the valve's chuff and the wastegate's rattle when the pedal lifts.

Five cylinders fire every 144°, two and a half times per crank turn, which puts the note between a four's and a six's. The warble is the energy off that note, on the half orders around it, from the small differences in each cylinder's path to the turbine. This swap's tubular manifold keeps its runners nearly equal, so the warble stays and the extra growl of a cast log manifold's long outer runners does not. Near full boost its external wastegate vents part of the raw, unsilenced exhaust beside the pipe, a brash rasp on top of the note.

Turbocharged inline six

The Grove's 2.5 Turbo Six swap, to 7,500 rpm. The smoothest note here: compare its evenness with the narrow-angle V6 above, which has the same firing order.

An inline six fires every 120° on one pipe with its runners close in length, and the turbo smears what little unevenness its manifold adds. The narrow-angle V6 fires in the same order. The difference you hear between the two clips is almost entirely the far row's longer pipes.

Cross-plane V8

The Grove's 6.2 Pushrod V8 swap: twin pipes with an H-pipe between them, to 6,800 rpm. The burble is each bank's uneven rhythm, one bank in each ear.

A cross-plane V8 fires evenly overall, every 90°, but each bank on its own fires at 180, 270, 180 and 90° intervals. With a pipe per bank, each tailpipe carries that lopsided rhythm, and that is the burble. The H-pipe hands 20 percent of each bank's pulse to the other pipe, softening it a little.

What went wrong on the way?

Most of what I learned came from things that sounded wrong. In rough order:

  • The silencer vanished. ConvolverNode normalizes its impulse response by default, and that buried a long response about 25 dB down. It is off now, and the response is peak normalized when it is rendered.
  • The V8 lost its burble. Two symmetric tailpipes summed to mono cancelled a cross-plane bank's unevenness exactly, because the chain is linear. Real twin pipes are never quite equal, so the second pipe in the game runs 5 cm further, and every voice renders its two tips left and right.
  • The silencer boomed at random. A decaying sine of amplitude A and time constant τ has a gain of Aτ/2 at its own frequency. Sized like impulses, the first silencer modes were +40 dB resonances that low notes would set off unpredictably. Sized by their Q and a boost over the direct path, a +6 dB mode is a +6 dB mode.
  • Everything hissed. Three sources put grain above 4 kHz: a valvetrain tick at every firing (350 a second for a six at 7,000 rpm), nearly white noise driving the pipe's wander, and turbulence noise 2 kHz wide. Each was fixed at its source, the wavetable went from 2,048 to 8,192 points so its derivative stopped stepping at idle, and the voice rolls off above 6.5 kHz.
  • Equal level was not equal loudness. At the same RMS a bright six with individual throttle bodies read about 6 dB louder than a smooth turbo. Now each engine is measured once when it loads, through a frequency domain model of the whole chain, K-weighted as broadcast loudness meters are, and trimmed to one reference. A-weighting was the wrong choice: it discounts the bass an engine lives in, and trimmed a V8 up until its peaks fought the compressor. A test holds every car within 2 dB of the others.
  • The pops were gunshots. They were first sized against the wrong level and landed about 14 dB over the engine. Sized against a levelled tip's real level, a bang now sits about 6 dB over the engine's own peaks.

Street Scene is built with Claude Code, and this part leans on measuring instead of guessing: the engine tests compare voices by their spectra (how much energy sits off the firing grid, which orders are loudest, whether a car is mono), so a change that makes the V8 too even or the six too rough fails before anyone listens.

How does it sit in the mix?

Most of an engine's energy is below 300 Hz, which laptop and phone speakers barely reproduce. So each voice has a presence peak that follows the firing frequency, +6 dB at its sixth harmonic, held between 550 and 2,400 Hz where small speakers work. The engines have their own bus, beside effects, ambience and menu sounds, and the player's engine at full throttle is the reference every other sound in the game is balanced against. The master ends in a limiter at −3 dBFS that only has to catch a crash, a cheer and a bang landing together.

How can I hear it in the game?

Open the garage, pick Dyno at the bottom of the view, and hold W, the up arrow or Space (touch screens have a button). The car is strapped to the rollers in a middle gear, and a full pull from idle to the redline takes about five and a half seconds while the wall screen draws power and torque from the same curve the physics uses. Swap the engine and pull again to hear the difference. The Tune tab's Pops & bangs slider changes how often the exhaust crackles, and it only changes the sound and the flames, never the car's performance.

Open the garage Or just play

How were the clips on this page made?

By the game itself. A script loaded the game's real engine voice into an offline audio context in a headless browser and drove it with the garage's own rev model, stepped every 16 ms, at the levels the garage uses. The browser rendered the worklet, the silencer convolution, the filters, the turbo nodes and the master limiter faster than real time. All six full clips got the same −2 dB of gain, and the raw clip comes from the synth alone in Node. Then they were encoded to Opus and AAC. Nothing was edited, layered or recorded.

Common questions

Does Street Scene use recorded engine sounds?

No. Every engine is synthesized live in the browser from its firing order, exhaust layout, silencer and turbo, so the engine sounds add no audio files to the download.

What is Engine Simulator?

An open source engine simulator by Ange Yaghi, MIT licensed, that models the gas in a running engine and turns it into sound. Street Scene follows its structure for timing and shaping exhaust pulses but replaces its gas simulation with a cheaper shaped pulse per firing.

Does the engine sound use much CPU?

About 1 percent of a core per voice on a laptop, measured headless, and it runs on the audio thread rather than with the graphics. It has not been measured on phones yet.

Play Street Scene free

BlogKeep reading

See all blog posts

The whole city at night from high above, towers of lit windows running out to dark hills

Tonight

The city is waiting

Free, to play in your browser, on desktop or phone.

Play now