Virtual Piano
Available in: English, Español, Deutsch, Français, Ελληνικά, Nederlands, Italiano, Português, 日本語
More playable instruments
About This Tool
This virtual keyboard uses the Web Audio API (W3C standard) to generate instrument sounds in real-time directly in your browser. It features a dual sound engine: instant synthesis for immediate playback, and HD instrument samples from the FluidR3 General MIDI soundfont for professional-quality sound. All frequencies follow 12-tone equal temperament with A4 = 440 Hz as defined by ISO 16:1975.
How to Use
- Choose an instrument from the selector buttons above the keyboard
- Click keys, tap on touch devices, or use your computer keyboard (Z–M row for white keys, S–K row for black keys) to play notes
- Adjust octave range, volume, and sustain to suit your needs. Press Record to capture your performance.
Methodology
All sounds are generated using the Web Audio API (W3C standard). Frequencies follow 12-tone equal temperament (12-TET) where each semitone is a frequency ratio of 2^(1/12) ≈ 1.05946, with A4 = 440 Hz (ISO 16:1975 standard). Piano uses additive synthesis with 8 harmonics and inharmonicity modeling to simulate the stretched partial tones of real piano strings. Electric Piano uses frequency modulation (FM) synthesis with a carrier-to-modulator ratio inspired by the Yamaha DX7 synthesizer (1983). Organ uses drawbar synthesis based on Hammond tonewheel organ principles, with 9 harmonics at footage ratios (16', 5⅓', 8', 4', 2⅔', 2', 1⅗', 1⅓', 1'). Synth Lead uses subtractive synthesis with detuned sawtooth oscillators through a resonant low-pass filter. Strings use detuned oscillators with slow attack envelopes. Marimba uses percussive synthesis with harmonic ratios characteristic of tuned bar instruments. HD samples from the FluidR3 General MIDI soundfont load in the background for professional-quality playback. Each instrument has proper ADSR (Attack, Decay, Sustain, Release) envelopes for realistic dynamics.
Understanding Your Results
The note display above the keyboard shows the currently playing note in scientific pitch notation (e.g., C4 for middle C) along with its frequency in Hertz. This helps you identify notes as you play and can serve as an ear training aid. When HD samples are loaded, you will see an "HD" badge on the active instrument button, indicating that playback has switched from synthesis to high-quality recorded samples. Synthesis mode is indicated by the absence of this badge. Velocity (how loud a note plays) is determined by where you click on a key — clicking near the top produces a softer sound, while clicking near the bottom plays louder. On computer keyboard input, notes play at a consistent medium velocity.
Practical Examples
Example 1: C Major Scale — Play the white keys in sequence from C4 to C5 (computer keyboard: Z, X, C, V, B, N, M, then shift up one octave and press Z). Each note's frequency doubles every octave: C4 = 261.63 Hz, C5 = 523.25 Hz. Example 2: C Major Chord — Press C4 (261.63 Hz), E4 (329.63 Hz), and G4 (392.00 Hz) simultaneously. On the computer keyboard, press Z, C, and B together. Enable sustain first for a richer sound. Try the same chord with different instruments to compare timbres.
Playing Tips
Start with the Piano instrument and 2 octaves to learn the key layout. The note labels can be toggled on to help identify keys while learning. Try playing a C major chord by pressing C, E, and G simultaneously. On the computer keyboard, that's Z, C, and B together. Use sustain mode when practicing arpeggios — notes will ring together even after you release each key, creating a fuller sound. Switch between instruments to hear how the same melody sounds with different timbres. The Organ has an instant attack, while Strings have a slow fade-in. Adjust the octave range to focus on the register you need. For bass practice, shift down to octave 1–2. For treble melodies, shift up to octave 5–6.
Sources
Your data is never sent. We collect anonymous usage statistics only. Privacy details