Skip to content

Repository files navigation

REV EV — authentic engine audio for the Tesla browser

Open the live app  ·  How vehicle data works  ·  Audio sources

React 19 TypeScript 46 tests passing 48 kHz Opus audio Local only

REV//EV turns live GPS motion into a responsive combustion-engine soundtrack inside the Tesla browser. It uses layered, royalty-free field recordings rather than generated oscillator tones: idle, RPM bands, intake roar, turbo/wastegate, shifts and real backfire one-shots.

REV EV dashboard running the F40 LM Raw profile at speed

Why it sounds real

  • Actual field recordings — sourced from Ferrari 458, 488, 812 and F40 LM recording sessions in the Sonniss GameAudioGDC bundles.
  • Five continuous RPM layers — adjacent recordings are pitch-adjusted and crossfaded as the virtual engine moves through the rev range.
  • Load-dependent character — full throttle adds a genuine intake roar or turbo/wastegate run instead of merely turning up the volume.
  • Real overrun events — deceleration and shift cuts trigger randomized two-to-four-shot backfire clusters.
  • Fast in-car loading — twenty edited 48 kHz Opus assets total roughly 1.7 MB.
  • Graceful fallback — a lightweight Web Audio synthesizer is used only when the authentic sample pack cannot load.

Sound profiles

Profile Continuous engine Dynamic layers
F40 LM Raw F40 LM idle and four driving RPM bands Turbo/wastegate run, shift cuts and backfire clusters
Italian Raw 812 idle plus four 488 exhaust RPM bands 812 start/blips, 458 intake roar and backfire clusters

The processed samples and their exact source filenames are documented in docs/audio-sources.md.

How the vehicle data works

Important

A normal website in the Tesla browser cannot access accelerator position, CAN bus data or Tesla's internal VehicleSpeed signal.

REV//EV uses the browser's standard navigator.geolocation.watchPosition() API:

  1. Prefer the native coords.speed value when the browser supplies it.
  2. Otherwise calculate speed from consecutive GPS fixes using Haversine distance.
  3. Filter GPS jitter and derive acceleration from the speed curve.
  4. Estimate throttle, engine load, virtual gear, shift phase and RPM.
  5. Feed that state into the authentic sample engine in real time.
flowchart LR
    A["Tesla browser GPS"] --> B["Motion estimator"]
    B --> C["Speed + acceleration"]
    C --> D["Virtual drivetrain"]
    D --> E["RPM · load · gear · overrun"]
    E --> F["Sample engine"]
    F --> G["RPM crossfades"]
    F --> H["Roar / turbo layers"]
    F --> I["Backfire clusters"]
    G --> J["Vehicle speakers"]
    H --> J
    I --> J
Loading

True pedal and CAN data would require a Tesla Developer application, OAuth, a Virtual Key and a Fleet Telemetry backend. That architecture is deliberately not used here: the app remains local, account-free and immediately usable from a browser.

Run locally

Requirements: Node.js 22 or newer and npm.

git clone https://github.com/mirowaltisberg/rev-ev.git
cd rev-ev
npm install
npm run dev

Open the local URL, choose a sound profile, press Motor starten, and grant location access. Demo fahren provides a simulated drive cycle for desktop testing.

Quality checks

npm run test:run   # unit and component tests
npm run typecheck  # TypeScript project check
npm run build      # production Vite build

The test suite covers GPS fallbacks, motion filtering, drivetrain behaviour, RPM-layer mixing, authentic-sample playback, overrun pops and the main interface.

Privacy and safety

  • No login, backend, analytics or advertising.
  • GPS coordinates remain in the browser and are never stored or transmitted by the app.
  • The interface should only be configured while the vehicle is stationary.
  • Speed, load, gear and RPM are estimates and must not be used for navigation or diagnostics.

Audio rights

The included field recordings come from the royalty-free Sonniss GameAudioGDC bundles and are used under the Sonniss GDC Bundle License. See the audio source manifest for full provenance.

The source code is currently published without an open-source licence. Public visibility does not grant reuse rights to the code.

Disclaimer

REV//EV is an independent personal project. It is not affiliated with or endorsed by Tesla, Ferrari, Porsche, Sonniss or EVSoundFX. Vehicle names are used only to identify the original field-recording sources.

About

Authentic GPS-responsive engine audio for the Tesla browser

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages