What is Piano Keyboard?

Piano Keyboard is a virtual piano with realistic sound synthesis. Play with mouse clicks or keyboard shortcuts across multiple octaves — no physical instrument needed.

Sound is generated by a Tone.js polyphonic triangle-wave synth, so notes can be held and chords played at the same time. The bottom keyboard row (Z, X, C, V, B, N, M) maps to white keys and the row above (S, D, G, H, J) to black keys. Sustain holds a note until you release the key, the octave buttons shift the playable range, and a Record button captures your performance as a downloadable WebM audio file.

How to use

  1. Click any key on the virtual piano to play a note — white keys are natural notes, black keys are sharps/flats.
  2. Use your computer keyboard for faster playing — the bottom two rows map to piano keys (Z=C, S=C#, X=D, etc.).
  3. Change the octave range or switch between instrument sounds using the controls above the keyboard.

When to use

  • Practising scales or chord shapes when away from a real piano during travel or at the office.
  • Sketching out a melody idea and recording a short clip to share with a collaborator or send to a DAW.
  • Teaching a beginner where the notes sit on the keyboard using the on-screen letter labels.

Result

A music student wants to practice a C major scale. They click C, D, E, F, G, A, B, C on the virtual keyboard, hearing each note clearly through their speakers.

FAQ

Which computer keys play which notes?
The bottom row Z X C V B N M plays the white keys C through B in the current octave. S, D, G, H, J above them play C#, D#, F#, G# and A#. Pressing the same key again retriggers the note. Holding several at once plays a chord.
Why don't I hear any sound when I click the keys?
Audio can't start until you interact with the page first. The first click or keypress initialises the synth, which can add a half-second delay. After that, every note plays instantly. If your system volume is muted or the tab is muted, the tool can't override that.
Does the recording sound exactly like what I played?
Yes. The Tone.js Recorder taps the synth output directly, so timing, velocity, and sustain all match the live playback. The file is WebM (or whatever audio format your device supports); drag it into a DAW or share as is.
Can I change the instrument sound and play in a specific scale?
Yes. The Voice row above the keyboard switches between Acoustic, Electric, Organ and Synth timbres, and the Scale selector highlights the notes that belong to Major, Minor, Pentatonic, Blues or Chromatic scales rooted on any pitch. Turning on Lock silences notes outside the chosen scale so beginners only hear in-key sounds while they explore.
What's the difference between sustain on and off?
With sustain off, a note rings only while the key is held — release the key and the sound stops. With sustain on, every note rings to its natural decay regardless of whether you release the key, which is the behaviour of pressing the right pedal on an acoustic piano.

Related Tools