Building a synthesizer in the browser with Tone.js

June 26, 2025

I've always been intrigued by the sound and design of analog synthesizers. Recently I decided to channel that interest into building a browser-based software emulation of a synthesizer that I own, the Prophet Rev2. TLDR: My version does not sound as good. But it was fun to experiment with the Web Audio API and Tone.js.

You can try the live demo here

Browser-based synthesizer interface

The Building Blocks

  • Dual Oscillators: The core sound comes from two oscillators per voice, which can be set to sawtooth, triangle, or square waveforms.
  • Low-Pass Filter: A low-pass filter that shapes the timbre by attenuating frequencies above the cutoff point.
  • Dual LFOs: Two Low-Frequency Oscillators that can be routed to either the filter's cutoff frequency or the pitch of the main oscillators.

Browser vs. Hardware: A Feature Comparison

The Prophet Rev2 is an incredibly deep instrument, and while my version is only a digital representation, I tried to stay true to some of its core design principles.

Browser-based synthesizer interface

Where It's Similar

  • 8-Voice Polyphony: The synth can play up to 8 notes at once.
  • Signal Path: The basic architecture of Oscillators -> Filter -> Amplifier attempts to emulate the Prophet's circuit design.
  • LFO Routing: The ability to modulate the filter and oscillator pitch is a fundamental part of the Prophet's sound-design workflow.

Where It Differs

  • Analog vs. Digital: The Rev2 is fundamentally an analog synthesizer with DCOs and true analog filters. My browser version is entirely digital, running through the Web Audio API—a completely different approach in terms of sound generation and character.
  • Modulation Matrix: The hardware includes an 8-slot modulation matrix. My version has a much simpler, fixed routing system for its LFOs.

What's Next

Looking ahead, there are a few features I might implement when I have time:

  1. Adding Filter Resonance: This would add depth and lend itself to a more authentic analog sound.
  2. Saving Patches: Allowing users to save and load their creations using localStorage would add a lot of utility.

Feel free to explore the source code on GitHub.