A feature-rich, browser-based synthesizer built with vanilla JavaScript and the Web Audio API. Create music directly in your browser with no plugins or downloads required.
- 2-octave virtual keyboard with both white and black keys
- Computer keyboard support (QWERTY layout)
- Visual feedback for active notes
- Oscillator: 4 waveform types (Sawtooth, Square, Triangle, Sine)
- Detune: Fine-tune oscillator pitch (-50 to +50 cents)
- Low-pass Filter: Adjustable cutoff frequency and resonance
- ADSR Envelope: Full Attack, Decay, Sustain, Release control
- Delay: Adjustable delay time with feedback
- Reverb: Convolution reverb for spatial depth
- Master Volume: Global output level control
- Lead: Bright, cutting lead synthesizer sound
- Bass: Deep, punchy bass tones
- Pad: Lush, atmospheric pad sounds
- Pluck: Short, percussive plucked sounds
- Retro-futuristic design inspired by classic synthesizers
- Real-time visual feedback with animated value bars
- Responsive layout that works on desktop and mobile
-
Clone this repository:
git clone https://github.com/your-username/web-synthesizer.git
-
Open
web_synth.html
in your web browser -
Start playing! Use your mouse to click keys or use your computer keyboard
| | | | | | | | | | | | |
| | W | | E | | | T | | Y | | U | |
| | | | | | | | | | | | |
| A | S | D | F | G | H | J | K | L | ; | ' | |
| | | | | | | | | | | | |
- A S D F G H J: White keys (C D E F G A B)
- W E T Y U: Black keys (C# D# F# G# A#)
- HTML5: Structure and layout
- CSS3: Styling with gradients, animations, and responsive design
- JavaScript ES6+: Core functionality and audio processing
- Web Audio API: Real-time audio synthesis and effects
Note: Requires a modern browser with Web Audio API support
AudioContext
↓
Oscillator → Filter → Effects Chain → Master Gain → Output
↓
Delay + Reverb
- Click on the keyboard keys or use your computer keyboard
- Adjust the filter cutoff for different tonal colors
- Modify the envelope settings to change how notes start and end
-
Creating a Lead Sound:
- Set waveform to Sawtooth
- Increase filter cutoff (3000+)
- Add some resonance (10-15)
- Quick attack, medium release
-
Creating a Bass Sound:
- Set waveform to Square
- Lower filter cutoff (800-1200)
- Increase resonance (15-20)
- Very quick attack, short release
-
Creating a Pad Sound:
- Set waveform to Triangle
- Moderate filter cutoff (1500-2000)
- Long attack and release times
- Add reverb for space
MicroKorgSynth
: Main synthesizer class handling audio generation- Audio nodes: Oscillator, Filter, Delay, Reverb, Master Gain
The synthesizer is designed to be extensible. You can easily add:
- New waveforms
- Additional effects
- More presets
- Extended keyboard range
- MIDI support
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic hardware synthesizers like the MicroKorg
- Built using the powerful Web Audio API
🎵 Happy Music Making! 🎵