Skip to main content
P0 Virtual Instrument

Free Online Virtual Piano

Play piano online using your computer keyboard, mouse, or touch screen. Real-time Web Audio synthesis with sustain pedal emulation and octave controls. The most responsive virtual piano on the web.

OCTAVE:4
SUSTAIN:

About the Virtual Piano

The virtual piano is the centerpiece of our music tools platform. It lets musicians, students, composers, and producers play, practice, and experiment directly in the browser — no software installation, no account creation, no cost.

Built on the Web Audio API with triangle harmonic synthesis, each key produces a piano-like tone with natural exponential decay. The interface supports three input methods: mouse click for point-and-play, computer keyboard for two-handed play (A-S-D-F-G-H-J-K-L for white keys, W-E-T-Y-U-O-P for black keys), and touch for mobile and tablet devices with full multi-touch chord support.

The sustain pedal (Spacebar) emulates a real damper pedal — lifted keys continue to ring until the pedal is released. Octave shift controls let you access all 88 keys regardless of screen size.

Features

  • Full 88-key range via octave shifting (default: 3 visible octaves)
  • Triangle wave synthesis with piano-like envelope (fast attack, exponential decay)
  • Sustain pedal emulation (Spacebar toggle)
  • Computer keyboard mapping with visual shortcut overlay
  • Multi-touch support for mobile and tablet
  • Standard A4 = 440 Hz concert pitch
  • Responsive layout — adapts to any screen size

FAQ

Frequently Asked Questions

How do I play the virtual piano with my computer keyboard?
Use keys A, S, D, F, G, H, J, K, L, ; for the white keys, and W, E, T, Y, U, O, P for the black keys. Press Spacebar to toggle the sustain pedal. Use the +/- buttons to shift octaves up and down.
Is the piano sound synthesized or sampled?
Our virtual piano uses pure Web Audio API triangle harmonic synthesis with exponential decay envelopes. This means instant loading, zero samples to download, and realistic piano-like tone.
Can I play multiple notes at once (chords)?
Yes! Multi-touch is supported on mobile devices, and simultaneous key presses work on physical keyboards. Hold down multiple keys to play chords naturally.
Does the sustain pedal work like a real piano?
Yes. When sustain is ON, released notes continue to ring out until you toggle it off — just like a real damper pedal. Press Spacebar to toggle.
How many octaves does the virtual piano have?
The full version spans all 88 keys (MIDI 21–108). The default view shows 3 octaves, and you can shift octaves using the controls or keyboard shortcuts.
Can I change the volume?
Yes, the volume slider in the controls adjusts the output level. Each key also responds to velocity — press harder on a MIDI keyboard for louder notes.
Does it work on iPad and tablets?
Yes, the piano is fully touch-optimized. On tablets you get a wider range of visible keys. Multi-touch supported for playing chords.
Can I use this to learn piano?
Absolutely. The labeled keys, keyboard shortcuts overlay, and sustain control make it ideal for beginners. Pair it with our chord and scale tools.
What is the frequency reference used?
A4 = 440 Hz (standard concert pitch). All notes are calculated using equal temperament tuning.
Does it work offline?
Once loaded, the piano works without internet since all audio synthesis is client-side. Full offline support via service workers is planned.