01 / Sound
Harmonics and a hammer
Each note is built from its harmonics with a soft hammer attack and a brightness that fades like a struck string.
Free tool
Play the piano right here: click or tap the keys, or use your computer keyboard, from A for C to the apostrophe for F. Hold Space for the sustain pedal, move up and down with Z and X, and change the volume and the room. Plug in a MIDI keyboard to play the real thing. Record what you play, listen back, and save it as WAV, MP3 or a MIDI file.
Need a custom tool, app or website? Contact us →Keys: A W S E D F T G Y H U J K O L P ; and ' play one and a half octaves from C. Space is the pedal, Z and X change octave. Click MIDI keyboard to play a real keyboard plugged into this computer.
Everything plays in your browser. Nothing is uploaded or recorded unless you save it.
How it sounds
01 / Sound
Each note is built from its harmonics with a soft hammer attack and a brightness that fades like a struck string.
02 / Play
Press lower on a key to play louder. Slide across the keys for a quick run.
03 / Keep
Record your playing, play it back, and save a WAV made with exactly the same sound.
Guide
A virtual piano is a piano keyboard on screen that you play with the mouse, a touch screen or the letter keys on your computer. This one shows three octaves at a time on a computer (fewer, wider keys on a phone), takes a MIDI keyboard, has a sustain pedal and a room reverb, and can record what you play and save it as WAV, MP3 or MIDI. The sound is made in the page as you play, so there is nothing to install and no sound files to load.
Plug a USB MIDI keyboard into your computer and click MIDI keyboard above the keys. The browser asks once whether the page may use MIDI devices. After that, every key you press plays here, as loud or soft as you hit it, and the sustain pedal plugged into the keyboard works too. Keys outside the range on screen still sound. A keyboard plugged in later connects by itself. Chrome, Edge and Firefox can read MIDI keyboards; Safari cannot, so use the computer keys or the mouse there.
The letter keys cover one and a half octaves. When the page first opens, A plays middle C, which is C4. The note names on the keys show which octave each C belongs to.
| Computer key | Note | Colour |
|---|---|---|
| A | C | White |
| W | C# | Black |
| S | D | White |
| E | D# | Black |
| D | E | White |
| F | F | White |
| T | F# | Black |
| G | G | White |
| Y | G# | Black |
| H | A | White |
| U | A# | Black |
| J | B | White |
| K | C, one octave up | White |
| O, L, P, ;, ' | C#, D, D#, E, F, one octave up | Black, white, black, white, white |
Notice there is no black key between E and F, or between B and C. That is why R and I on the top row play nothing. Set Labels on keys to Computer keys to see the letters printed on the piano itself while you learn the layout.
Both of these use only white keys from middle C, so you can play them with the default octave.
Twinkle, Twinkle, Little Star. The notes are C C G G A A G, then F F E E D D C. On your computer keyboard that is:
Ode to Joy. The first line is E E F G G F E D C C D E E D D. On your computer keyboard that is D D F G G F D S A A S D D S S.
Play each line slowly at first. Once the notes are in your fingers, hold Space through the last note of each line so it rings out, then let go before the next line starts so the notes do not blur together.
A piano repeats the same 12 notes over and over: seven white keys named C, D, E, F, G, A and B, and five black keys between them. Each black key is the sharp of the white key to its left, so the black key after C is C#. It is also the flat of the white key to its right, so C# and Db are the same key.
The number after a note name is its octave. Middle C is C4, and the A above it, A4, is the note orchestras tune to at 440 Hz. Each octave up doubles the frequency, so A5 is 880 Hz. The screen shows three octaves at a time, and with the octave buttons you can move the whole range from as low as C0 up to C8.
Record keeps the notes you play, how hard and when, including the pedal, not a recording from a microphone. Play it back books every note on the browser's audio clock, so it comes back in the same time you played it. When you save as WAV or MP3, the tool plays your notes again into a 44.1 kHz stereo file with the same piano sound and room setting, plus a few seconds at the end so the last note can fade. Because it saves the notes rather than the room around you, the file has no background noise.
MIDI saves the notes themselves: each note with its strength, and the pedal, at 120 BPM so the timing matches what you played. Open piano.mid in GarageBand, Logic, MuseScore or any other music program to change the sound, fix a wrong note or print it as sheet music.
Want to build chords from the notes you know? Try the chord finder. To keep steady time while you practise, open the metronome in another tab, and to write a full tune with drums, use the song maker.
Questions
Yes. The middle row plays the white keys from C (A, S, D, F...), the row above plays the black keys. Labels can show which key is which.
Yes: hold Space, or click Pedal, and notes ring on after you let go.
Yes: press Record, play, press Stop recording, then play it back or save it as WAV, MP3 or MIDI.
Yes, tap the keys. A phone shows fewer, wider keys; turn it sideways for more.
Yes, in Chrome, Edge and Firefox. Plug it in, click MIDI keyboard and allow MIDI when the browser asks. Velocity and the sustain pedal work.
Yes. Record, then pick MIDI next to Save. The file keeps each note, how hard you played it and the pedal.
When the page opens, the A key on your computer keyboard plays middle C (C4). On screen it is the C labelled C4. If you have moved the octave, press Z or X until A plays C4 again.
Use the top row of letters: W, E, T, Y, U, O and P. Each sits just above and between the two white keys it falls between on a real piano.
Yes, with the mouse or touch. Pressing near the bottom of a key plays louder than pressing near the top. Notes from the computer keyboard all play at the same level, and the Volume slider sets the overall level.
You can learn note names, the layout of the keys and simple melodies. A real piano or a keyboard with full size keys is better for building hand position and finger strength.